elric91 / homeassistant_zigate

Custom components for Home Assistant
MIT License
22 stars 5 forks source link

ON/OFF command capabilities for switches #7

Closed alexbarcelo closed 6 years ago

alexbarcelo commented 6 years ago

I implemented this and tested (it works!) for Aqara Wall Switches.

It was thanks to #1 that I was able to craft the command (also looking to official documentation). I don't know if there are other use cases, different from the Aqara hardware.

ISO-B commented 6 years ago

I think that correct way to send commands is using hass services. You can check example from light component. Otherwise good work

alexbarcelo commented 6 years ago

I forgot about the new component light, and looked into other homeassistant components. Good call. The commit now should maintain internal consistency by using the same as the light component.

Did I mess something during the fix?

elric91 commented 6 years ago

Seems good to me although I don't have any device to test

We will have to put it back in the pyzigate library (as for the light component) in the future as HASS require all device specific code to be hosted outside HASS