From 4d46f5ec079e886981450c4ae88adc5db928376a Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Sun, 21 Jan 2024 02:37:39 +0100 Subject: [PATCH] Add icon translations for Pegelonline (#108554) add icon translations --- .../components/pegel_online/icons.json | 27 +++++++++++++++++++ .../components/pegel_online/sensor.py | 7 ----- 2 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 homeassistant/components/pegel_online/icons.json diff --git a/homeassistant/components/pegel_online/icons.json b/homeassistant/components/pegel_online/icons.json new file mode 100644 index 00000000000000..b3192ba52839c2 --- /dev/null +++ b/homeassistant/components/pegel_online/icons.json @@ -0,0 +1,27 @@ +{ + "entity": { + "sensor": { + "air_temperature": { + "default": "mdi:thermometer-lines" + }, + "clearance_height": { + "default": "mdi:bridge" + }, + "oxygen_level": { + "default": "mdi:water-opacity" + }, + "water_speed": { + "default": "mdi:waves-arrow-right" + }, + "water_flow": { + "default": "mdi:waves" + }, + "water_level": { + "default": "mdi:waves-arrow-up" + }, + "water_temperature": { + "default": "mdi:thermometer-water" + } + } + } +} diff --git a/homeassistant/components/pegel_online/sensor.py b/homeassistant/components/pegel_online/sensor.py index 5f7f431ddf7e04..657baf29c9f3a7 100644 --- a/homeassistant/components/pegel_online/sensor.py +++ b/homeassistant/components/pegel_online/sensor.py @@ -42,7 +42,6 @@ class PegelOnlineSensorEntityDescription( measurement_key="air_temperature", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.TEMPERATURE, - icon="mdi:thermometer-lines", entity_registry_enabled_default=False, ), PegelOnlineSensorEntityDescription( @@ -51,14 +50,12 @@ class PegelOnlineSensorEntityDescription( measurement_key="clearance_height", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.DISTANCE, - icon="mdi:bridge", ), PegelOnlineSensorEntityDescription( key="oxygen_level", translation_key="oxygen_level", measurement_key="oxygen_level", state_class=SensorStateClass.MEASUREMENT, - icon="mdi:water-opacity", entity_registry_enabled_default=False, ), PegelOnlineSensorEntityDescription( @@ -74,7 +71,6 @@ class PegelOnlineSensorEntityDescription( measurement_key="water_speed", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.SPEED, - icon="mdi:waves-arrow-right", entity_registry_enabled_default=False, ), PegelOnlineSensorEntityDescription( @@ -82,7 +78,6 @@ class PegelOnlineSensorEntityDescription( translation_key="water_flow", measurement_key="water_flow", state_class=SensorStateClass.MEASUREMENT, - icon="mdi:waves", entity_registry_enabled_default=False, ), PegelOnlineSensorEntityDescription( @@ -90,7 +85,6 @@ class PegelOnlineSensorEntityDescription( translation_key="water_level", measurement_key="water_level", state_class=SensorStateClass.MEASUREMENT, - icon="mdi:waves-arrow-up", ), PegelOnlineSensorEntityDescription( key="water_temperature", @@ -98,7 +92,6 @@ class PegelOnlineSensorEntityDescription( measurement_key="water_temperature", state_class=SensorStateClass.MEASUREMENT, device_class=SensorDeviceClass.TEMPERATURE, - icon="mdi:thermometer-water", entity_registry_enabled_default=False, ), )