From 033dd356553b3dced8b0468dd9e74fbd757891aa Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Sat, 9 Mar 2024 20:48:21 +0100 Subject: [PATCH] Add icon translations to Yeelight (#112363) * Add icon translations to Yeelight * Add icon translations to Yeelight --- homeassistant/components/yeelight/icons.json | 19 +++++++++++++++++++ homeassistant/components/yeelight/light.py | 1 - tests/components/yeelight/test_light.py | 1 - 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 homeassistant/components/yeelight/icons.json diff --git a/homeassistant/components/yeelight/icons.json b/homeassistant/components/yeelight/icons.json new file mode 100644 index 00000000000..bf0d0c497f0 --- /dev/null +++ b/homeassistant/components/yeelight/icons.json @@ -0,0 +1,19 @@ +{ + "entity": { + "light": { + "nightlight": { + "default": "mdi:weather-night" + } + } + }, + "services": { + "set_mode": "mdi:cog", + "set_color_scene": "mdi:palette", + "set_hsv_scene": "mdi:palette", + "set_color_temp_scene": "mdi:palette", + "set_color_flow_scene": "mdi:palette", + "set_auto_delay_off_scene": "mdi:timer", + "start_flow": "mdi:play", + "set_music_mode": "mdi:music" + } +} diff --git a/homeassistant/components/yeelight/light.py b/homeassistant/components/yeelight/light.py index a9a35cb71b7..ede652dd037 100644 --- a/homeassistant/components/yeelight/light.py +++ b/homeassistant/components/yeelight/light.py @@ -1002,7 +1002,6 @@ class YeelightNightLightMode(YeelightBaseLight): """Representation of a Yeelight when in nightlight mode.""" _attr_color_mode = ColorMode.BRIGHTNESS - _attr_icon = "mdi:weather-night" _attr_supported_color_modes = {ColorMode.BRIGHTNESS} _attr_translation_key = "nightlight" diff --git a/tests/components/yeelight/test_light.py b/tests/components/yeelight/test_light.py index d61532e3f21..d3d2ba52124 100644 --- a/tests/components/yeelight/test_light.py +++ b/tests/components/yeelight/test_light.py @@ -857,7 +857,6 @@ async def test_device_types( state = hass.states.get(f"{entity_id}_nightlight") assert state.state == "on" nightlight_entity_properties["friendly_name"] = f"{name} Nightlight" - nightlight_entity_properties["icon"] = "mdi:weather-night" nightlight_entity_properties["flowing"] = False nightlight_entity_properties["night_light"] = True nightlight_entity_properties["music_mode"] = False