From 8dacb4f9eaaee0dbd4832f06e4605e0804928c6f Mon Sep 17 00:00:00 2001 From: Jan Rieger Date: Sat, 20 Jan 2024 11:16:56 +0100 Subject: [PATCH] Add icon translations to AVM FRITZ!Box Call Monitor (#108417) * Add icon translations to AVM FRITZ!Box Call Monitor * Update homeassistant/components/fritzbox_callmonitor/icons.json Co-authored-by: Franck Nijhof * Update homeassistant/components/fritzbox_callmonitor/icons.json Co-authored-by: Franck Nijhof --------- Co-authored-by: Franck Nijhof --- .../components/fritzbox_callmonitor/const.py | 2 -- .../components/fritzbox_callmonitor/icons.json | 14 ++++++++++++++ .../components/fritzbox_callmonitor/sensor.py | 2 -- 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 homeassistant/components/fritzbox_callmonitor/icons.json diff --git a/homeassistant/components/fritzbox_callmonitor/const.py b/homeassistant/components/fritzbox_callmonitor/const.py index 75050374e52394..a13a86574dfdce 100644 --- a/homeassistant/components/fritzbox_callmonitor/const.py +++ b/homeassistant/components/fritzbox_callmonitor/const.py @@ -14,8 +14,6 @@ class FritzState(StrEnum): DISCONNECT = "DISCONNECT" -ICON_PHONE: Final = "mdi:phone" - ATTR_PREFIXES = "prefixes" FRITZ_ATTR_NAME = "name" diff --git a/homeassistant/components/fritzbox_callmonitor/icons.json b/homeassistant/components/fritzbox_callmonitor/icons.json new file mode 100644 index 00000000000000..836d3159681189 --- /dev/null +++ b/homeassistant/components/fritzbox_callmonitor/icons.json @@ -0,0 +1,14 @@ +{ + "entity": { + "sensor": { + "fritzbox_callmonitor": { + "default": "mdi:phone", + "state": { + "ringing": "mdi:phone-incoming", + "dialing": "mdi:phone-outgoing", + "talking": "mdi:phone-in-talk" + } + } + } + } +} diff --git a/homeassistant/components/fritzbox_callmonitor/sensor.py b/homeassistant/components/fritzbox_callmonitor/sensor.py index 03ac98419c17dc..036c9605d0a35c 100644 --- a/homeassistant/components/fritzbox_callmonitor/sensor.py +++ b/homeassistant/components/fritzbox_callmonitor/sensor.py @@ -26,7 +26,6 @@ CONF_PREFIXES, DOMAIN, FRITZBOX_PHONEBOOK, - ICON_PHONE, MANUFACTURER, SERIAL_NUMBER, FritzState, @@ -79,7 +78,6 @@ async def async_setup_entry( class FritzBoxCallSensor(SensorEntity): """Implementation of a Fritz!Box call monitor.""" - _attr_icon = ICON_PHONE _attr_has_entity_name = True _attr_translation_key = DOMAIN _attr_device_class = SensorDeviceClass.ENUM