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

Remove binary sensors for ZHA remotes and controllers #24370

Merged

Conversation

dmulcahey
Copy link
Contributor

Breaking Change:

There will no longer be binary sensors created for remotes, buttons and controller devices. These were a bad idea from the start and should have been removed when we added event support.

Description:

This PR removes binary sensors that were created for remotes, buttons and controller devices. It also fixes: #23997 where we were incorrectly matching domains because of the bad remote support.

Related issue (if applicable): fixes #23997

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]

@ghost
Copy link

ghost commented Jun 7, 2019

Hey there @Adminiuga, mind taking a look at this pull request as its been labeled with a integration (zha) you are listed as a codeowner for? Thanks!

This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people.

@dmulcahey dmulcahey changed the title Remove binary sensors for ZHA remotes and controllers WIP - Remove binary sensors for ZHA remotes and controllers Jun 7, 2019
@dmulcahey dmulcahey changed the title WIP - Remove binary sensors for ZHA remotes and controllers Remove binary sensors for ZHA remotes and controllers Jun 7, 2019
Copy link
Contributor

@Adminiuga Adminiuga left a comment

Choose a reason for hiding this comment

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

Looks good!

@Adminiuga
Copy link
Contributor

I concur. Those remotes are stateless by nature and trying to keep the states of the remote entities consistent across restarts was a pita.
I understand there could be some users relying on binary_sensors for remotes, but it is really much better to use ZHA events and IMO it is in their interest to migrate to zha events. Let's consider this as a friendly nudge :)

@Adminiuga Adminiuga merged commit 592d30d into home-assistant:dev Jun 7, 2019
@Hedda
Copy link
Contributor

Hedda commented Jun 12, 2019

@dmulcahey Does the zha component description/documentation in zha.markdown need updating?

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

https://github.com/home-assistant/home-assistant.io/blob/current/source/_components/zha.markdown

Compare for example to to the zwave component description/documentation?

https://www.home-assistant.io/components/zwave/

@ryanwinter
Copy link

I think the only downside of using event's over entities, is the discoverability. In the zha control panel, you can see the associated entities for each device. However for events, you kind of have to either know, or do some investigation by pressing buttons and see what happens.

It would be nice if there was so way to have events associated with the devices and visible in the zha control panel so that people could just look in there to see what they need to capture.

The second part is that creating automations based on the events is a little clunky. Rather than just being able to choose the entity, I have to enter the ieee for the device and then also the event. Another nice to be would be the ability, in the automation editor, to just choose the zha device, and then automatically get a list of associated events to choose from.

Both of these are probably way bigger than zha :)

@KennethLavrsen
Copy link

The way I have to use Events with deconz at the moment is horrible from a user perspective.

You have to KNOW that you need to use a developer tool and type "deconz_event" in a text box and listen to events while you clock the switch. You have to KNOW which of the JSON data to look for and you need to KNOW how to interpret that into YAML automations.

You also have to KNOW that the only way to rename the entity ID of these event sources is in deconz. Now this is all deconz and not ZHA. But if the result is a similar user experience for ZHA then it is a major step back.

I agree that binary sensors are also a bad solution. But if you want to create a nice user experience for a user who is not a Home Assistant developer or very experience user than you need to provide

  • Some means to discover and display these entities.
  • Some means for the user to know which event values that are present
  • Some means to rename the often cryptic generic names into something related to their use

I have no oppinion how to do this and I would be happy to follow some Zigbee integration feature where I had to click some event discovery mode and then having to press the buttons long and short and double and whatever. The current way where you have to know the name of the event, type it in, and look at JSON coded info is for sure not user friendly at all. At least with the binary sensors they were showing up as entities that I could see go on and off and I could rename them like any other entity.

Maybe you have some alternative but then I cannot see it in this bug report. But if it ends up like deconz then it is a major step back for the newbies. I have become an advanced user now but even I keep on forgetting if the event is deconz_event or deconz_events or events_deconz. I often have to type the name several times until I get it right. It is horrible the way you have to do it now. And at least with deconz I know where to rename the device (in Phoscon) but how would I rename the event source in ZHA?

@balloob balloob mentioned this pull request Jun 26, 2019
@homecb
Copy link

homecb commented Jun 29, 2019

Hello. My Xiaomi door / windows (magnet) sensors have become unusable because of this change. Can anyone suggest how I can keep track of the state of my devices after this change? (Unlike buttons/remotes/controllers these sensors actually had states) Thanks.

@Adminiuga
Copy link
Contributor

@homecb wrong place. Merge comments is not correct place for issues. Open an issue with https://github.com/dmulcahey/zha-device-handlers and submit exact manufacturer and model as presented in HA

@poelsevev
Copy link

Ok. This makes it a lott harder to get my dimmer wall swithces to work. worked nice as a binary sensor with a level of 0-255 and status on/off. My automation for getting this to work is useless now.

@dmulcahey
Copy link
Contributor Author

@poelsevev use binding instead

@home-assistant home-assistant locked as resolved and limited conversation to collaborators Jul 1, 2019
@dmulcahey dmulcahey deleted the dm/zha-remove-remote-profile branch July 18, 2019 10:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zigbee switch (Peanut Smart Plug) “missing” after HA .93 update
8 participants