diff --git a/homeassistant/components/nexia/icons.json b/homeassistant/components/nexia/icons.json new file mode 100644 index 00000000000..620d1a42c03 --- /dev/null +++ b/homeassistant/components/nexia/icons.json @@ -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" + } +} diff --git a/homeassistant/components/nexia/number.py b/homeassistant/components/nexia/number.py index b44c6a4c48f..019d425d1ad 100644 --- a/homeassistant/components/nexia/number.py +++ b/homeassistant/components/nexia/number.py @@ -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__( diff --git a/homeassistant/components/nexia/scene.py b/homeassistant/components/nexia/scene.py index 3a21c61badd..ba9e8b12dde 100644 --- a/homeassistant/components/nexia/scene.py +++ b/homeassistant/components/nexia/scene.py @@ -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 diff --git a/homeassistant/components/nexia/switch.py b/homeassistant/components/nexia/switch.py index 7f191d39c73..87c3f6dc938 100644 --- a/homeassistant/components/nexia/switch.py +++ b/homeassistant/components/nexia/switch.py @@ -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: diff --git a/tests/components/nexia/test_scene.py b/tests/components/nexia/test_scene.py index 0678921f7ea..e01d843c298 100644 --- a/tests/components/nexia/test_scene.py +++ b/tests/components/nexia/test_scene.py @@ -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