Skip to content

Add "consumer connected" attribute to Xiaomi EU plugs#2198

Merged
TheJulianJES merged 1 commit into
zigpy:devfrom
TheJulianJES:tjj/xiaomi_plug_eu_consumer_connected_add_attr
Feb 16, 2023
Merged

Add "consumer connected" attribute to Xiaomi EU plugs#2198
TheJulianJES merged 1 commit into
zigpy:devfrom
TheJulianJES:tjj/xiaomi_plug_eu_consumer_connected_add_attr

Conversation

@TheJulianJES
Copy link
Copy Markdown
Collaborator

For zha-quirks, this fixes #2181
Follow-up PR for ZHA to create the binary sensor:

Tested using a Xiaomi MAEU01 plug on v32 and v41 firmware.
#2181 mentions it also works on an MMEU01 plug (so the other Xiaomi EU plug).

@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 4186948529

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 83.698%

Totals Coverage Status
Change from base Build 4129468121: 0.0%
Covered Lines: 6844
Relevant Lines: 8177

💛 - Coveralls

@TheJulianJES TheJulianJES added the ready PR should be ready to merge label Feb 15, 2023
Copy link
Copy Markdown
Collaborator

@javicalle javicalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TheJulianJES TheJulianJES merged commit e121843 into zigpy:dev Feb 16, 2023
@myhomeiot
Copy link
Copy Markdown
Contributor

myhomeiot commented Mar 6, 2023

@TheJulianJES Maybe it's will be good idea to make this sensor as device_class: plug?
PS: Sorry I doesn't mention this before, I just found that HA has this device class :(
PS2: I test it using customize_glob:

  customize_glob:
    "binary_sensor.*_consumer_connected":
      device_class: plug

image

@TheJulianJES
Copy link
Copy Markdown
Collaborator Author

TheJulianJES commented Mar 6, 2023

Yep, I also just saw that a couple of days ago 😄
If I don't forget, I'll PR that change to HA in the next few days or so

@TheJulianJES
Copy link
Copy Markdown
Collaborator Author

@myhomeiot

PR'ed:

Btw., you don't need to use customize.yaml. You can change it using the entity editor:
image

totoroot pushed a commit to totoroot/zha-device-handlers that referenced this pull request Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready PR should be ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Device Support Request] consumer_connected binary_sensor for lumi.plug.mmeu01

4 participants