Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add scenes as switches HomeKit #17799
Adds scenes as switches to HomeKit
As described here: #17793 (comment)
To finish this PR, you would just need to add a test case here: https://github.com/home-assistant/home-assistant/blob/dev/tests/components/homekit/test_get_accessories.py#L138-L139
and update the documentation.
We would also need to integrate a check inside the
if self._domain == 'scene' and value == 0: _LOGGER.debug('%s: Ignoring turn_off call', self.entity_id) return
Adding this right after the debug statement should work: https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/homekit/type_switches.py#L81-L88
Since I added extra tests for
reset_switch, you would need to add the scene to it as well: https://github.com/home-assistant/home-assistant/blob/dev/tests/components/homekit/test_type_switches.py#L182-L183
Lastly you would need to open a doc PR, to add scenes to the list of supported components (inside the HomeKit docs).