From 81590ac887f75c7fa7c04467038fcabd3948aca7 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 27 Feb 2024 22:22:56 +0100 Subject: [PATCH] Add icon translations to Goodwe (#111655) --- homeassistant/components/goodwe/button.py | 1 - homeassistant/components/goodwe/icons.json | 22 ++++++++++++++++++++++ homeassistant/components/goodwe/number.py | 2 -- homeassistant/components/goodwe/select.py | 1 - 4 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 homeassistant/components/goodwe/icons.json diff --git a/homeassistant/components/goodwe/button.py b/homeassistant/components/goodwe/button.py index 0aebdb8c073..f551e09fc6a 100644 --- a/homeassistant/components/goodwe/button.py +++ b/homeassistant/components/goodwe/button.py @@ -35,7 +35,6 @@ class GoodweButtonEntityDescription( SYNCHRONIZE_CLOCK = GoodweButtonEntityDescription( key="synchronize_clock", translation_key="synchronize_clock", - icon="mdi:clock-check-outline", entity_category=EntityCategory.CONFIG, action=lambda inv: inv.write_setting("time", datetime.now()), ) diff --git a/homeassistant/components/goodwe/icons.json b/homeassistant/components/goodwe/icons.json new file mode 100644 index 00000000000..f5abd358baa --- /dev/null +++ b/homeassistant/components/goodwe/icons.json @@ -0,0 +1,22 @@ +{ + "entity": { + "button": { + "synchronize_clock": { + "default": "mdi:clock-check-outline" + } + }, + "number": { + "grid_export_limit": { + "default": "mdi:transmission-tower" + }, + "battery_discharge_depth": { + "default": "mdi:battery-arrow-down" + } + }, + "select": { + "operation_mode": { + "default": "mdi:solar-power" + } + } + } +} diff --git a/homeassistant/components/goodwe/number.py b/homeassistant/components/goodwe/number.py index d92f6ab8fd0..09e056da607 100644 --- a/homeassistant/components/goodwe/number.py +++ b/homeassistant/components/goodwe/number.py @@ -51,7 +51,6 @@ NUMBERS = ( GoodweNumberEntityDescription( key="grid_export_limit", translation_key="grid_export_limit", - icon="mdi:transmission-tower", entity_category=EntityCategory.CONFIG, device_class=NumberDeviceClass.POWER, native_unit_of_measurement=UnitOfPower.WATT, @@ -66,7 +65,6 @@ NUMBERS = ( GoodweNumberEntityDescription( key="grid_export_limit", translation_key="grid_export_limit", - icon="mdi:transmission-tower", entity_category=EntityCategory.CONFIG, native_unit_of_measurement=PERCENTAGE, native_step=1, diff --git a/homeassistant/components/goodwe/select.py b/homeassistant/components/goodwe/select.py index bc22376e4d9..6d033eab242 100644 --- a/homeassistant/components/goodwe/select.py +++ b/homeassistant/components/goodwe/select.py @@ -31,7 +31,6 @@ _OPTION_TO_MODE: dict[str, OperationMode] = { OPERATION_MODE = SelectEntityDescription( key="operation_mode", - icon="mdi:solar-power", entity_category=EntityCategory.CONFIG, translation_key="operation_mode", )