mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Add icon translations to Nexia (#111980)
* Add icon translations to Nexia * Add icon translations to Nexia
This commit is contained in:
parent
895dc6fce1
commit
f02e60533d
27
homeassistant/components/nexia/icons.json
Normal file
27
homeassistant/components/nexia/icons.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
@ -41,7 +41,6 @@ class NexiaFanSpeedEntity(NexiaThermostatEntity, NumberEntity):
|
|||||||
"""Provides Nexia Fan Speed support."""
|
"""Provides Nexia Fan Speed support."""
|
||||||
|
|
||||||
_attr_native_unit_of_measurement = PERCENTAGE
|
_attr_native_unit_of_measurement = PERCENTAGE
|
||||||
_attr_icon = "mdi:fan"
|
|
||||||
_attr_translation_key = "fan_speed"
|
_attr_translation_key = "fan_speed"
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
@ -35,7 +35,7 @@ async def async_setup_entry(
|
|||||||
class NexiaAutomationScene(NexiaEntity, Scene):
|
class NexiaAutomationScene(NexiaEntity, Scene):
|
||||||
"""Provides Nexia automation support."""
|
"""Provides Nexia automation support."""
|
||||||
|
|
||||||
_attr_icon = "mdi:script-text-outline"
|
_attr_translation_key = "automation"
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, coordinator: NexiaDataUpdateCoordinator, automation: NexiaAutomation
|
self, coordinator: NexiaDataUpdateCoordinator, automation: NexiaAutomation
|
||||||
|
@ -53,11 +53,6 @@ class NexiaHoldSwitch(NexiaThermostatZoneEntity, SwitchEntity):
|
|||||||
"""Return if the zone is in hold mode."""
|
"""Return if the zone is in hold mode."""
|
||||||
return self._zone.is_in_permanent_hold()
|
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:
|
async def async_turn_on(self, **kwargs: Any) -> None:
|
||||||
"""Enable permanent hold."""
|
"""Enable permanent hold."""
|
||||||
if self._zone.get_current_mode() == OPERATION_MODE_OFF:
|
if self._zone.get_current_mode() == OPERATION_MODE_OFF:
|
||||||
|
@ -30,7 +30,6 @@ async def test_automation_scenes(hass: HomeAssistant) -> None:
|
|||||||
"change Fan Mode to Auto"
|
"change Fan Mode to Auto"
|
||||||
),
|
),
|
||||||
"friendly_name": "Away Short",
|
"friendly_name": "Away Short",
|
||||||
"icon": "mdi:script-text-outline",
|
|
||||||
}
|
}
|
||||||
# Only test for a subset of attributes in case
|
# Only test for a subset of attributes in case
|
||||||
# HA changes the implementation and a new one appears
|
# 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'"
|
"Activate the mode named 'Power Outage'"
|
||||||
),
|
),
|
||||||
"friendly_name": "Power Outage",
|
"friendly_name": "Power Outage",
|
||||||
"icon": "mdi:script-text-outline",
|
|
||||||
}
|
}
|
||||||
# Only test for a subset of attributes in case
|
# Only test for a subset of attributes in case
|
||||||
# HA changes the implementation and a new one appears
|
# HA changes the implementation and a new one appears
|
||||||
@ -70,7 +68,6 @@ async def test_automation_scenes(hass: HomeAssistant) -> None:
|
|||||||
"'Home'"
|
"'Home'"
|
||||||
),
|
),
|
||||||
"friendly_name": "Power Restored",
|
"friendly_name": "Power Restored",
|
||||||
"icon": "mdi:script-text-outline",
|
|
||||||
}
|
}
|
||||||
# Only test for a subset of attributes in case
|
# Only test for a subset of attributes in case
|
||||||
# HA changes the implementation and a new one appears
|
# HA changes the implementation and a new one appears
|
||||||
|
Loading…
x
Reference in New Issue
Block a user