From 35599046acc6e2ede28a8899e723545134434390 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 4 Mar 2024 15:36:50 +0100 Subject: [PATCH] Add icon translations to Ridwell (#112210) --- homeassistant/components/ridwell/calendar.py | 2 +- homeassistant/components/ridwell/icons.json | 14 ++++++++++++++ homeassistant/components/ridwell/switch.py | 1 - 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 homeassistant/components/ridwell/icons.json diff --git a/homeassistant/components/ridwell/calendar.py b/homeassistant/components/ridwell/calendar.py index 3ef3bbdc5ae..bf9c83914ac 100644 --- a/homeassistant/components/ridwell/calendar.py +++ b/homeassistant/components/ridwell/calendar.py @@ -49,8 +49,8 @@ async def async_setup_entry( class RidwellCalendar(RidwellEntity, CalendarEntity): """Define a Ridwell calendar.""" - _attr_icon = "mdi:delete-empty" _attr_name = None + _attr_translation_key = "calendar" def __init__( self, coordinator: RidwellDataUpdateCoordinator, account: RidwellAccount diff --git a/homeassistant/components/ridwell/icons.json b/homeassistant/components/ridwell/icons.json new file mode 100644 index 00000000000..dd9680ae687 --- /dev/null +++ b/homeassistant/components/ridwell/icons.json @@ -0,0 +1,14 @@ +{ + "entity": { + "calendar": { + "calendar": { + "default": "mdi:delete-empty" + } + }, + "switch": { + "opt_in": { + "default": "mdi:calendar-check" + } + } + } +} diff --git a/homeassistant/components/ridwell/switch.py b/homeassistant/components/ridwell/switch.py index f47fc1ca0af..c18e1d44b07 100644 --- a/homeassistant/components/ridwell/switch.py +++ b/homeassistant/components/ridwell/switch.py @@ -19,7 +19,6 @@ from .entity import RidwellEntity SWITCH_DESCRIPTION = SwitchEntityDescription( key="opt_in", translation_key="opt_in", - icon="mdi:calendar-check", )