From ef7e2cfc08bb4d1f1649c99cf8bb53f4be1aaa54 Mon Sep 17 00:00:00 2001
From: Joost Lekkerkerker <joostlek@outlook.com>
Date: Mon, 22 Jan 2024 09:06:25 +0100
Subject: [PATCH] Add icon translations to Abode (#108407)

---
 homeassistant/components/abode/alarm_control_panel.py | 3 ---
 homeassistant/components/abode/icons.json             | 9 +++++++++
 homeassistant/components/abode/switch.py              | 4 +---
 3 files changed, 10 insertions(+), 6 deletions(-)
 create mode 100644 homeassistant/components/abode/icons.json

diff --git a/homeassistant/components/abode/alarm_control_panel.py b/homeassistant/components/abode/alarm_control_panel.py
index d0137395446..4671b71059d 100644
--- a/homeassistant/components/abode/alarm_control_panel.py
+++ b/homeassistant/components/abode/alarm_control_panel.py
@@ -17,8 +17,6 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
 from . import AbodeDevice, AbodeSystem
 from .const import DOMAIN
 
-ICON = "mdi:security"
-
 
 async def async_setup_entry(
     hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
@@ -33,7 +31,6 @@ async def async_setup_entry(
 class AbodeAlarm(AbodeDevice, alarm.AlarmControlPanelEntity):
     """An alarm_control_panel implementation for Abode."""
 
-    _attr_icon = ICON
     _attr_name = None
     _attr_code_arm_required = False
     _attr_supported_features = (
diff --git a/homeassistant/components/abode/icons.json b/homeassistant/components/abode/icons.json
new file mode 100644
index 00000000000..89cee031818
--- /dev/null
+++ b/homeassistant/components/abode/icons.json
@@ -0,0 +1,9 @@
+{
+  "entity": {
+    "switch": {
+      "automation": {
+        "default": "mdi:robot"
+      }
+    }
+  }
+}
diff --git a/homeassistant/components/abode/switch.py b/homeassistant/components/abode/switch.py
index 14bdf4e0caf..8443a16ef8f 100644
--- a/homeassistant/components/abode/switch.py
+++ b/homeassistant/components/abode/switch.py
@@ -17,8 +17,6 @@ from .const import DOMAIN
 
 DEVICE_TYPES = [CONST.TYPE_SWITCH, CONST.TYPE_VALVE]
 
-ICON = "mdi:robot"
-
 
 async def async_setup_entry(
     hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
@@ -63,7 +61,7 @@ class AbodeSwitch(AbodeDevice, SwitchEntity):
 class AbodeAutomationSwitch(AbodeAutomation, SwitchEntity):
     """A switch implementation for Abode automations."""
 
-    _attr_icon = ICON
+    _attr_translation_key = "automation"
 
     async def async_added_to_hass(self) -> None:
         """Set up trigger automation service."""
-- 
GitLab