I’m thinking that smoke alarms are required to run on batteries - specifically because of the risk of a general power failure.
But - I do not know that for certain.
I thought that too, but salty ocean air and batteries.. Do they get along well together? I would think not.