What happens, if an Aqara device has its battery exchanged?

I’m starting to have some devices lose their battery … so I put a new CR2032 in. They were added to HA through ZHA. Now I notice, my Aqara Weather device (temp, humidity, airpressure) does not come back after the battery change. The battery is good and tested, the device does it’s usual blinks when klicking it’s button (where I’m never sure what this does or how many modes with how many seconds pressed it knows). It’s in the ZHA list of devices, but doesn’t do anything … no data accessible. I had hoped you just swap battery and after a while, it’s back in the Zigbee network … but a least not for several devices now. What am I doing wrong?

Removing the device from Home Assistant manually breaks automations and creates unnecessary work. I verified this with Sonoff (SNZB-05P) and Aqara devices.

Two methods restore the device without data loss:

Method 1 - Soft (Wake & Reconfigure)

For sleeping devices or failed handshakes.

  • Click “Reconfigure” on the device page
  • Short-press the sensor button (~1 second)
    Mechanism: Wakes the radio to accept the coordinator’s configuration payload.

Method 2 - Hard (Factory Reset & Re-pair)

When the device shows Unavailable or Method 1 fails.

  • Put Zigbee integration in “Add Device” mode
  • Long-press sensor button (5+ seconds) until LED flashes
    Mechanism: Factory resets the sensor but keeps the IEEE address. Home Assistant recognizes it as existing, re-establishes the network key, and maps back to original entity IDs.

Result: Device becomes active again with all history and automations intact.

1 Like

For me if that ever happens (with most ZHA devices) I just start the pairing process in the ZHA integration (zha->add device) then when it’s searching short click the device button once. it should find the device and connect to it. it should maintain all of the configuration of the device including names, entity_id’s etc.

I don’t think I remember that ever not working for me after just replacing the battery.

Actually, try letting the battery drain completely in a Sonoff SNZB-01P (button) or SNZB-02P (Temperature & Humidity Sensor).
Many users mistakenly assume Zigbee will “self-heal” after a battery swap. However, once a device is deeply discharged and dropped from the coordinator’s routing table, you can wait a day, a week, or a month, and it will never reappear.
The manual re-pairing action is necessary to force the coordinator to re-admit the device. I confirmed this behavior using the ZBT-1 coordinator.

@WallyR - I think there’s been a misunderstanding about my original point. I wasn’t talking about device IDs in automations (that’s obvious - we all use entity IDs there).

My concern was about custom entity names being preserved during the wake/reconfigure process.

I rename all my entities to follow a consistent naming scheme for easier YAML writing. Real examples from my Sonoff devices:

Manufacturer defaults:

  • binary_sensor.sonoff_snzb_05p
  • sensor.sonoff_snzb_02p_temperature

My custom names:

  • binary_sensor.boiler_room_water_leak_sensor_sonoff
  • sensor.midi_bathroom_temperature_sensor_sonoff

When I said “breaks automations” in my original post, I meant: if someone manually removes the device from HA and adds it fresh, they lose all those custom entity names. That’s the headache to avoid.

But the Reconfigure method (clicking Reconfigure + short button press to wake the device) doesn’t remove anything - it just refreshes the connection and brings the device back online. Custom entity names stay intact.

That’s what I was trying to clarify in my original response - the wake/reconfigure method is completely safe and preserves all your custom naming. Nothing to worry about after battery replacement.

Okay, but then your “headache” should just be to rename the newly added device’s entities to that of the old device.