Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove binary sensors for ZHA remotes and controllers #24370
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.
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
Jun 7, 2019
I concur. Those remotes are stateless by nature and trying to keep the states of the remote entities consistent across restarts was a pita.
Jun 7, 2019
10 checks passed
@dmulcahey Does the zha component description/documentation in zha.markdown need updating?
Compare for example to to the zwave component description/documentation?
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 :)
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
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?