From 0b64151ae03e7aa81a68f671f9084bf0928d363e Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Tue, 22 Apr 2025 12:48:35 +0200 Subject: [PATCH] Add icon translations and missing text translations for select in Overkiz (#143369) --- homeassistant/components/overkiz/icons.json | 25 +++++++++++++++++++ homeassistant/components/overkiz/select.py | 7 ++---- homeassistant/components/overkiz/strings.json | 6 +++++ 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/overkiz/icons.json b/homeassistant/components/overkiz/icons.json index 315df7da2c8..3347750063e 100644 --- a/homeassistant/components/overkiz/icons.json +++ b/homeassistant/components/overkiz/icons.json @@ -16,6 +16,31 @@ } } } + }, + "select": { + "open_closed_pedestrian": { + "default": "mdi:content-save-cog" + }, + "open_closed_partial": { + "default": "mdi:content-save-cog" + }, + "memorized_simple_volume": { + "default": "mdi:volume-medium", + "state": { + "highest": "mdi:volume-high", + "standard": "mdi:volume-medium" + } + }, + "operating_mode": { + "default": "mdi:sun-snowflake", + "state": { + "heating": "mdi:heat-wave", + "cooling": "mdi:snowflake" + } + }, + "active_zones": { + "default": "mdi:shield-lock" + } } } } diff --git a/homeassistant/components/overkiz/select.py b/homeassistant/components/overkiz/select.py index e23dafdaab8..d93b71b540f 100644 --- a/homeassistant/components/overkiz/select.py +++ b/homeassistant/components/overkiz/select.py @@ -72,7 +72,6 @@ SELECT_DESCRIPTIONS: list[OverkizSelectDescription] = [ OverkizSelectDescription( key=OverkizState.CORE_OPEN_CLOSED_PEDESTRIAN, name="Position", - icon="mdi:content-save-cog", options=[ OverkizCommandParam.OPEN, OverkizCommandParam.PEDESTRIAN, @@ -84,7 +83,6 @@ SELECT_DESCRIPTIONS: list[OverkizSelectDescription] = [ OverkizSelectDescription( key=OverkizState.CORE_OPEN_CLOSED_PARTIAL, name="Position", - icon="mdi:content-save-cog", options=[ OverkizCommandParam.OPEN, OverkizCommandParam.PARTIAL, @@ -96,7 +94,6 @@ SELECT_DESCRIPTIONS: list[OverkizSelectDescription] = [ OverkizSelectDescription( key=OverkizState.IO_MEMORIZED_SIMPLE_VOLUME, name="Memorized simple volume", - icon="mdi:volume-high", options=[OverkizCommandParam.STANDARD, OverkizCommandParam.HIGHEST], select_option=_select_option_memorized_simple_volume, entity_category=EntityCategory.CONFIG, @@ -106,20 +103,20 @@ SELECT_DESCRIPTIONS: list[OverkizSelectDescription] = [ OverkizSelectDescription( key=OverkizState.OVP_HEATING_TEMPERATURE_INTERFACE_OPERATING_MODE, name="Operating mode", - icon="mdi:sun-snowflake", options=[OverkizCommandParam.HEATING, OverkizCommandParam.COOLING], select_option=lambda option, execute_command: execute_command( OverkizCommand.SET_OPERATING_MODE, option ), entity_category=EntityCategory.CONFIG, + translation_key="operating_mode", ), # StatefulAlarmController OverkizSelectDescription( key=OverkizState.CORE_ACTIVE_ZONES, name="Active zones", - icon="mdi:shield-lock", options=["", "A", "B", "C", "A,B", "B,C", "A,C", "A,B,C"], select_option=_select_option_active_zone, + translation_key="active_zones", ), ] diff --git a/homeassistant/components/overkiz/strings.json b/homeassistant/components/overkiz/strings.json index d3f05f2b262..c8f0fae3622 100644 --- a/homeassistant/components/overkiz/strings.json +++ b/homeassistant/components/overkiz/strings.json @@ -112,6 +112,12 @@ "highest": "Highest", "standard": "Standard" } + }, + "operating_mode": { + "state": { + "heating": "[%key:component::climate::entity_component::_::state_attributes::hvac_action::state::heating%]", + "cooling": "[%key:component::climate::entity_component::_::state_attributes::hvac_action::state::cooling%]" + } } }, "sensor": {