mirror of
https://github.com/Andre0512/hon.git
synced 2026-06-19 19:06:53 +02:00
Small improvements
This commit is contained in:
@@ -269,6 +269,12 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
icon="mdi:volume-off",
|
||||
translation_key="buzzer",
|
||||
),
|
||||
HonConfigSwitchEntityDescription(
|
||||
key="startProgram.tabStatus",
|
||||
name="Tab Status",
|
||||
icon="mdi:silverware-clean",
|
||||
# translation_key="buzzer",
|
||||
),
|
||||
),
|
||||
"AC": (
|
||||
HonSwitchEntityDescription(
|
||||
@@ -408,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)
|
||||
|
||||
Reference in New Issue
Block a user