core: Xiaomi Mi Smart Plug (ZigBee Edition) - power monitoring no longer works after 0.111
The problem
Xiaomi Mi Smart Plug (ZigBee Edition). Power monitoring was working on 0.110.7 with the sensor.lumi_lumi_plug_XXXXX_analog_input entity showing Watts used by the device when powered on.
After upgrading to 0.111 this no longer works, the entity shows as “restored” under entities and “Unavailable” on my dashboards.
Environment
arch | x86_64 dev | false docker | false hassio | false installation_type | Home Assistant Core os_name | Linux os_version | 5.4.44-1-pve python_version | 3.7.3 timezone | Australia/Perth version | 0.112.1 virtualenv | true
- Home Assistant Core release with the issue: 0.111 onwards
- Last working Home Assistant Core release (if known): 0.110.7
- Operating environment (OS/Container/Supervised/Core): Core
- Integration causing this issue: zigbee
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/zha/
Problem-relevant configuration.yaml
zha:
database_path: /home/hass/.homeassistant/zigbee.db
Traceback/Error logs
No errors relating to this issue have been observed.
Additional information
I can see the following breaking change was implemented in 0.111
https://github.com/home-assistant/core/pull/36696
ZHA sensors corresponding to AnalogInput and MultistateInput Zigbee clusters have been dropped. These are mostly seen in Aqara vibration/cube devices which are pretty much stateless, so remove entities and rely on zha_events instead.
I have subscribed to zha_event and monitored while switching various plugs on and off however I do not receive any zha_events. There is no Power Monitoring data received while the plug is switched on.
This was previously provided by an _analog_input entity but based on this change it looks like that has been dropped? I have tried subscribing to zha_event but I don’t see any power utilisation events when I switch the plug on.
I have enabled debug logging for zha as per the troubleshooting guide but all I see is the on/off of the plug itself. I normally get the power utilisation in Watts showing up pretty much immediately on my Dashboards.
This is all that is logged when switching a plug on and then off 16 seconds later.
2020-07-02 22:26:43 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xee76:1:0x0006]: executed ‘on’ command with args: ‘()’ kwargs: ‘{}’ result: [1, <Status.SUCCESS: 0>] 2020-07-02 22:26:59 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xee76:1:0x0006]: executed ‘off’ command with args: ‘()’ kwargs: ‘{}’ result: [0, <Status.SUCCESS: 0>]
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (6 by maintainers)
The open source is about common goals. And there is a way for you to contribute to these goals: explain your use case in detail. The developers already explained several times why they removed the sensors. Now it’s your turn to explain why this might be not a good idea for some users and propose a better approach that would suit all HA users.