What immediately comes to mind is there’s probably a code requirement for hard-wired smoke detectors.
But if you are not connected to the grid that is meaningless, isn’t it? They can not mandate that you be connected to the grid.