Lithium batteries in smoke detectors typically last 5 to 10 years, depending on the battery type: whether it’s a replaceable standard lithium battery or a sealed, non-replaceable battery designed for the same lifespan as the detector itself. Anka Security has compiled the following information:

Sealed 10-Year Detectors: These detectors have a built-in lithium battery with a lifespan equal to the device’s lifespan. After approximately 10 years, the device will beep to indicate that the battery needs replacing.
5 to 10-Year Lifespan: Some other smoke detectors using lithium batteries (which may be replaceable) also have a battery lifespan of 5 to 10 years.

Regarding Smoke Detector Battery Replacement

Factors Affecting Battery Life: Actual battery life may vary depending on how frequently the detector is tested, as activating an alarm consumes more power than standby mode.
For sealed 10-year detectors, the entire unit should be replaced once the end-of-life warning is reached. For other models, please consult the manufacturer’s battery replacement instructions.

WIFI Smoke Detector