From ba961e12a4f81f51d7047087d36524799b15fb5c Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Sun, 25 Feb 2024 14:06:16 +0100 Subject: [PATCH] Use device class icon in Crownstone (#111361) --- homeassistant/components/crownstone/icons.json | 9 +++++++++ homeassistant/components/crownstone/light.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 homeassistant/components/crownstone/icons.json diff --git a/homeassistant/components/crownstone/icons.json b/homeassistant/components/crownstone/icons.json new file mode 100644 index 00000000000..fcc2822920b --- /dev/null +++ b/homeassistant/components/crownstone/icons.json @@ -0,0 +1,9 @@ +{ + "entity": { + "light": { + "german_power_outlet": { + "default": "mdi:power-socket-de" + } + } + } +} diff --git a/homeassistant/components/crownstone/light.py b/homeassistant/components/crownstone/light.py index a140de59017..a95238bcdbe 100644 --- a/homeassistant/components/crownstone/light.py +++ b/homeassistant/components/crownstone/light.py @@ -70,8 +70,8 @@ class CrownstoneEntity(CrownstoneBaseEntity, LightEntity): Light platform is used to support dimming. """ - _attr_icon = "mdi:power-socket-de" _attr_name = None + _attr_translation_key = "german_power_outlet" def __init__( self, crownstone_data: Crownstone, usb: CrownstoneUart | None = None