Add icon translations to Nexia (#111980)

* Add icon translations to Nexia

* Add icon translations to Nexia
This commit is contained in:
Joost Lekkerkerker 2024-03-03 14:08:33 +01:00 committed by GitHub
parent 895dc6fce1
commit f02e60533d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 28 additions and 10 deletions

View file

@ -0,0 +1,27 @@
{
"entity": {
"number": {
"fan_speed": {
"default": "mdi:fan"
}
},
"scene": {
"automation": {
"default": "mdi:script-text-outline"
}
},
"switch": {
"hold": {
"default": "mdi:timer",
"state": {
"on": "mdi:timer-off"
}
}
}
},
"services": {
"set_aircleaner_mode": "mdi:air-filter",
"set_humidify_setpoint": "mdi:water-percent",
"set_hvac_run_mode": "mdi:hvac"
}
}

View file

@ -41,7 +41,6 @@ class NexiaFanSpeedEntity(NexiaThermostatEntity, NumberEntity):
"""Provides Nexia Fan Speed support."""
_attr_native_unit_of_measurement = PERCENTAGE
_attr_icon = "mdi:fan"
_attr_translation_key = "fan_speed"
def __init__(

View file

@ -35,7 +35,7 @@ async def async_setup_entry(
class NexiaAutomationScene(NexiaEntity, Scene):
"""Provides Nexia automation support."""
_attr_icon = "mdi:script-text-outline"
_attr_translation_key = "automation"
def __init__(
self, coordinator: NexiaDataUpdateCoordinator, automation: NexiaAutomation

View file

@ -53,11 +53,6 @@ class NexiaHoldSwitch(NexiaThermostatZoneEntity, SwitchEntity):
"""Return if the zone is in hold mode."""
return self._zone.is_in_permanent_hold()
@property
def icon(self) -> str:
"""Return the icon for the switch."""
return "mdi:timer-off" if self._zone.is_in_permanent_hold() else "mdi:timer"
async def async_turn_on(self, **kwargs: Any) -> None:
"""Enable permanent hold."""
if self._zone.get_current_mode() == OPERATION_MODE_OFF:

View file

@ -30,7 +30,6 @@ async def test_automation_scenes(hass: HomeAssistant) -> None:
"change Fan Mode to Auto"
),
"friendly_name": "Away Short",
"icon": "mdi:script-text-outline",
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears
@ -51,7 +50,6 @@ async def test_automation_scenes(hass: HomeAssistant) -> None:
"Activate the mode named 'Power Outage'"
),
"friendly_name": "Power Outage",
"icon": "mdi:script-text-outline",
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears
@ -70,7 +68,6 @@ async def test_automation_scenes(hass: HomeAssistant) -> None:
"'Home'"
),
"friendly_name": "Power Restored",
"icon": "mdi:script-text-outline",
}
# Only test for a subset of attributes in case
# HA changes the implementation and a new one appears