mirror of
https://github.com/Andre0512/hon.git
synced 2025-05-30 14:35:16 -04:00
Fix checks
This commit is contained in:
parent
38a67ad64c
commit
20d467a2d5
5 changed files with 7 additions and 10 deletions
custom_components/hon
|
@ -414,9 +414,9 @@ async def async_setup_entry(
|
|||
entity = HonConfigSwitchEntity(hass, entry, device, description)
|
||||
elif isinstance(description, HonControlSwitchEntityDescription):
|
||||
if not (
|
||||
device.get(description.key) is not None
|
||||
or description.turn_on_key in list(device.commands)
|
||||
or description.turn_off_key in list(device.commands)
|
||||
device.get(description.key) is not None
|
||||
or description.turn_on_key in list(device.commands)
|
||||
or description.turn_off_key in list(device.commands)
|
||||
):
|
||||
continue
|
||||
entity = HonControlSwitchEntity(hass, entry, device, description)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue