|
|
|
@ -414,9 +414,9 @@ async def async_setup_entry(
|
|
|
|
entity = HonConfigSwitchEntity(hass, entry, device, description)
|
|
|
|
entity = HonConfigSwitchEntity(hass, entry, device, description)
|
|
|
|
elif isinstance(description, HonControlSwitchEntityDescription):
|
|
|
|
elif isinstance(description, HonControlSwitchEntityDescription):
|
|
|
|
if not (
|
|
|
|
if not (
|
|
|
|
device.get(description.key) is not None
|
|
|
|
device.get(description.key) is not None
|
|
|
|
or description.turn_on_key in list(device.commands)
|
|
|
|
or description.turn_on_key in list(device.commands)
|
|
|
|
or description.turn_off_key in list(device.commands)
|
|
|
|
or description.turn_off_key in list(device.commands)
|
|
|
|
):
|
|
|
|
):
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
entity = HonControlSwitchEntity(hass, entry, device, description)
|
|
|
|
entity = HonControlSwitchEntity(hass, entry, device, description)
|
|
|
|
|