Until a couple years ago we had a gas-fired tankless water heater which used a single D-cell battery for ignition, which had to be changed once every year or two. It wasn't connected to wall power at all.
There are, or used to be, Bosch tankless water heaters which used a small turbine connected to a piezo-electric igniter, no external power source required ever.