Add icon translations to Wilight (#112357)

This commit is contained in:
Joost Lekkerkerker 2024-03-06 12:27:05 +01:00 committed by GitHub
parent 1cc58f217b
commit 66fae7ff9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 7 deletions

View File

@ -55,7 +55,6 @@ class WiLightFan(WiLightDevice, FanEntity):
"""Representation of a WiLights fan."""
_attr_name = None
_attr_icon = "mdi:fan"
_attr_speed_count = len(ORDERED_NAMED_FAN_SPEEDS)
_attr_supported_features = FanEntityFeature.SET_SPEED | FanEntityFeature.DIRECTION

View File

@ -0,0 +1,17 @@
{
"entity": {
"switch": {
"watering": {
"default": "mdi:water"
},
"pause": {
"default": "mdi:pause-circle-outline"
}
}
},
"services": {
"set_watering_time": "mdi:timer",
"set_pause_time": "mdi:timer-pause",
"set_trigger": "mdi:gesture-tap-button"
}
}

View File

@ -56,10 +56,6 @@ VALID_TRIGGER_INDEX = vol.All(
DESC_WATERING = "watering"
DESC_PAUSE = "pause"
# Icons of the valve switch entities
ICON_WATERING = "mdi:water"
ICON_PAUSE = "mdi:pause-circle-outline"
def entities_from_discovered_wilight(api_device: PyWiLightDevice) -> tuple[Any]:
"""Parse configuration and add WiLight switch entities."""
@ -149,7 +145,6 @@ class WiLightValveSwitch(WiLightDevice, SwitchEntity):
"""Representation of a WiLights Valve switch."""
_attr_translation_key = "watering"
_attr_icon = ICON_WATERING
@property
def is_on(self) -> bool:
@ -266,7 +261,6 @@ class WiLightValvePauseSwitch(WiLightDevice, SwitchEntity):
"""Representation of a WiLights Valve Pause switch."""
_attr_translation_key = "pause"
_attr_icon = ICON_PAUSE
@property
def is_on(self) -> bool: