Skip to content

Commit

Permalink
Fix #6 with updated icons.
Browse files Browse the repository at this point in the history
  • Loading branch information
djtimca committed Jun 3, 2022
1 parent a1c242a commit 192561d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions custom_components/omnilogic/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def __init__(
state_key: str,
) -> None:

switch_type = coordinator.data[item_id].get("Type")
switch_type = coordinator.data[item_id].get("Type", "")

if switch_type:
icon = SWITCH_ICONS[switch_type]
if switch_type == "RLY_VALVE_ACTUATOR":
icon = "mdi:valve"

"""Initialize Entities."""
super().__init__(
Expand Down Expand Up @@ -273,7 +273,3 @@ async def async_set_speed(self, speed):
}
],
}

SWITCH_ICONS = {
"RLY_VALVE_ACTUATOR": "mdi:valve"
}

0 comments on commit 192561d

Please sign in to comment.