-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix power measurement for Aqara MAEU01 plugs with newer firmware (#1656)
* Add alternative Xiaomi MMEU01 plug signatures * Improve custom Xiaomi ElectricalMeasurementCluster - add lumi.plug.maeu01 - put default values for sensors - switch to report voltage on rms_voltage instead of wrongly used instantaneous_voltage attribute - set ac_power_divisor to 10 and multiple power_reported value to workaround a rounding error in ZHA * Use custom Xiaomi ElectricalMeasurementCluster, BasicCluter for MAEU01 plug * Rename quirk file to plug_eu.py * Temporary test changes * Add custom MeteringCluster for "current summation delivered" sensor in HA * Fix docs * Add OppleCluster to mmeu01, add alternative mmeu01 signatures, remove skip_config * Simplify common signatures * Change endpoint 21 replacement to more likely match actual signature (instead of US model) * Remove stale import * Simplify MAEU01 replacement to use MMEU01 replacement * Add power_outage_memory * Explicitly enable "OppleMode" now (set to 1 instead of 0) On v41 firmware, this attribute doesn't exist anymore. The plug behaves like it's set to "1" On v32 firmware, this attribute exists. Now, that we have a proper quirk that parses Xiaomi attributes, we want this set to "1" (enabled). This causes older firmware plugs to behave like newer plugs always do. * Add some comments * Add small test to validate OppleMode gets enabled on binding * Remove stale comment * Add Xiaomi EU plug current power consumption, total power consumption, and voltage test * Also remove Xiaomi MMEU01 plug from group 0 The MMEU01 plug also has newer firmware versions (like the MAEU01) which causes them to trigger when a command gets sent to group 0. Although remotes routing through this plug will still control it, removing it from group 0 seems to help. * Use create_catching_task from zigpy instead of asyncio.create_task * Remove plug from group 0 when binding OppleCluster, update tests * Use catching task for writing OppleMode attribute, update test Writing the OppleMode, for some reason, always times out but still writes the attribute successfully.
- Loading branch information
1 parent
3ba3124
commit 8149efd
Showing
3 changed files
with
258 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
This is wrong for LLKZMK11LM (lumi.relay.c2acn01). It's showing 103W for a 10W device.