Closed NotExist closed 1 year ago
I would prefer to keep the current functionality. Hubitat's "Light" capability is intended to indicate that a device is a light, so it's reasonable for the integration to assume the device is a light. When that's not the case, both Home Assistant and this integration allow a switch device to be used as a light, or vice versa.
When that's not the case, both Home Assistant and this integration allow a switch device to be used as a light, or vice versa.
Hi @jason0x43 , first of all thanks for your time checking this. I send the PR because I can't find the way to work this light entity as switch, in both (Home Assistant/this integration) way. I do know there's switch_as_x helper for switch in Home Assistant, but it's for switch entity, not available for light entity. I also had tried to configure the switch as light in the configuration flow of integration, but since is_definitely_light of the device is TRUE, therefore the device had been excluded during the "Set light as switch" step of the integration. And that's why I suggest to change the border.
May I know the correct way to get it right without such modification?
Hmm... I think you're right.
Since there's some device (for example, ZB4003/43078 from enbrighten/Jasco) will be reported with light capability but it can be used as switch. Changing LIGHT_CAPABILITIES to capabilities which only useful for real light devices. And for the device which been reported with capability "Light" but not other light-related capabilities, they should not be considered as "definitely_light" since they can be used as switch in real world.![image](https://user-images.githubusercontent.com/111748/196751177-204d5d0a-efe9-4a1f-952b-89b901f18bbb.png)