Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZHA can not redefine Aqara 2aeu1 in-wall switch #101093

Closed
ghost opened this issue Sep 29, 2023 · 4 comments · Fixed by #104683
Closed

ZHA can not redefine Aqara 2aeu1 in-wall switch #101093

ghost opened this issue Sep 29, 2023 · 4 comments · Fixed by #104683
Assignees

Comments

@ghost
Copy link

ghost commented Sep 29, 2023

The problem

Hi!
There is a problem with how the more then singel Aqara in-wall switches are declared in ZHA.
It showes up as a switch, even if it belongs to the light. domain, but you can't redefine the entities.
It is not uncommon in toilets and laundry rooms to have a double switch where one is an air extractor fan, lika a PAX fan.
The problem is that I can not redefine it as a fan. It will only show up as a light and get mixed up with automations controling lights.
The "show as" on the entity setting page is just not there and if you try to create a helper through the settings-integrations-helpers, the entity is not selectable.
The entity seams to be hardcoded to the light domain with entity-id
light.lumi_lumi_switch_l2aeu1_light_3, and not to the switch domain

Screenshot_20230929-073244
Screenshot_20230929-073324

What version of Home Assistant Core has the issue?

2023.9.3 and earlier as well

What was the last working version of Home Assistant Core?

Never been right since I bought the first one

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @dmulcahey, @Adminiuga, @puddly, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of zha can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign zha Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


zha documentation
zha source
(message by IssueLinks)

@TheJulianJES
Copy link
Member

The Aqara switch reports itself as a light. ZHA follows that and creates a light entity.
You can modify the device type by using YAML: https://www.home-assistant.io/integrations/zha/#modifying-the-device-type (IEEE + endpoint id)

However, existing Aqara switch quirks (for other Aqara switches) do modify the type from light to switch (various reasons). Adding another such quirk will always break the entities where it's defined as a light (and people use it as one) though.
(Some Aqara switches do not work at all without having a quirk which is one of the reasons the type is modified directly in the quirk.)

Issues regarding this switch:

@Hedda
Copy link
Contributor

Hedda commented Oct 12, 2023

However, existing Aqara switch quirks (for other Aqara switches) do modify the type from light to switch (various reasons). Adding another such quirk will always break the entities where it's defined as a light (and people use it as one) though. (Some Aqara switches do not work at all without having a quirk which is one of the reasons the type is modified directly in the quirk.)

FYI, this consistency issue and question how to deal with it was also raised for discussion here -> zigpy/zha-device-handlers#1957

@ghost
Copy link
Author

ghost commented Oct 18, 2023

For the singel rocker switch there is a quirk applied and on that one you CAN change it to whatever I like.
On the double rocker version, this quirk is not applied and there I can NOT redefine.
Is it possible to apply the quirk ti the double rocker switch as well?
Screenshot_20231018-082328
Screenshot_20231018-082147

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants