Hi everyone! I’m reaching out for some help with an issue I’m having with my Aqara Smart Plugs. I recently purchased two of them, and while they were working perfectly fine initially, I’ve noticed that one of them is no longer reporting energy usage. This is quite frustrating, especially since I rely on this data for monitoring my energy consumption. I’ve tried troubleshooting the issue myself, but I’m stuck and could really use some guidance from the community.
Let me start by explaining what I’ve done so far. I connected the plugs to my Home Assistant setup using ZHA, and everything seemed to be working as expected. However, after a few weeks, one of the plugs stopped showing energy data. I checked the logs and noticed an error related to the summa_formatting attribute in the Metering cluster. The error message is as follows:
Error adding entities for domain sensor with platform zha
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 382, in async_add_entities
await asyncio.gather(*tasks)
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 614, in _async_add_entity
await entity.add_to_platform_finish()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 782, in add_to_platform_finish
self.async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 539, in async_write_ha_state
self._async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 572, in _async_write_ha_state
state = self._stringify_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 545, in _stringify_state
if (state := self.state) is None:
File “/usr/src/homeassistant/homeassistant/components/sensor/init.py”, line 371, in state
value = self.native_value
File “/usr/src/homeassistant/homeassistant/components/zha/sensor.py”, line 174, in native_value
return self.formatter(raw_state)
File “/usr/src/homeassistant/homeassistant/components/zha/sensor.py”, line 471, in formatter
return self._channel.summa_formatter(value)
File “/usr/src/homeassistant/homeassistant/components/zha/core/channels/smartenergy.py”, line 196, in _formatter_function
return self._summa_format.format(value).lstrip()
AttributeError: ‘NoneType’ object has no attribute ‘format’
From what I understand, this error occurs because the summa_format attribute is None, which means the formatter can’t process the energy data. I’ve checked the Zigbee signature of the affected plug, and it matches the working one. Both devices report the same values for the current_summ_delivered attribute in the Metering cluster. Despite this, one plug works perfectly, while the other doesn’t.
I’ve tried resetting the plug, reinstalling the integration, and even replacing the device with a new one from a different seller. Unfortunately, the issue persists. I’m starting to suspect that there might be a firmware or hardware issue specific to certain batches of the Aqara Smart Plugs.
I’m really hoping someone in the community has encountered a similar issue and can offer some advice. Has anyone else experienced problems with energy monitoring on their Aqara Smart Plugs? Are there any workarounds or fixes that I might have missed? I’m all ears and would greatly appreciate any help!
Thanks in advance for your time and assistance!
Best regards,
[Your Name]