Skip to content

Force update of zha remotes to make automation easier#14795

Closed
dmulcahey wants to merge 2 commits intohome-assistant:devfrom
dmulcahey:dm/zha-dimmer-force-update
Closed

Force update of zha remotes to make automation easier#14795
dmulcahey wants to merge 2 commits intohome-assistant:devfrom
dmulcahey:dm/zha-dimmer-force-update

Conversation

@dmulcahey
Copy link
Copy Markdown
Contributor

Description:

Because these are "remotes" and not true switches each button press should result in a state change. This may not be necessary once zha supports groups.

addresses: zigpy/zigpy#55

@balloob
Copy link
Copy Markdown
Member

balloob commented Jun 7, 2018

This is because a button/remote is represented as a binary sensor, that's wrong to begin with. Those should be converted to just fire events by the zha.py component and not be entities.

@balloob balloob closed this Jun 7, 2018
@ghost ghost removed the small-pr PRs with less than 30 lines. label Jun 7, 2018
@dmulcahey
Copy link
Copy Markdown
Contributor Author

@ballob I’m willing to fix the issue. Can you provide any guidance? Or is there a particular platform that has an example of how you expect this to be implemented? I understand that the implementation isn’t correct (I was kinda confused myself when I initially saw it) but I’m unsure of how to have a component that fires events without a backing entity.

@balloob
Copy link
Copy Markdown
Member

balloob commented Jun 7, 2018

I don't know how zha works, so I can only give you global guidance:

The logic should live components/zha.py. Listen to zha to when the button is pressed. When pressed, run hass.bus.fire('zha.button_pressed', { 'node_id': 'some_node_id' })

@dshokouhi
Copy link
Copy Markdown
Member

@dmulcahey I use xiaomi switches with the xiaomi_aqara component. The switch will show up as a binary_sensor but that doesn't serve a purpose. All of my automations are based off the events that are sent to HA. deconz also does things in a similar fashion too.

@dmulcahey
Copy link
Copy Markdown
Contributor Author

@balloob can you take a peek at #14902 and let me know if this is headed in the right direction? Thanks!

@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018
@dmulcahey dmulcahey deleted the dm/zha-dimmer-force-update branch December 26, 2018 12:11
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.

4 participants