From 75df17a8bbd0712379d28d378d76b6fc309a2c86 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 5 Mar 2024 21:46:59 +0100 Subject: [PATCH] Add icon translations to Vallox (#112339) --- .../components/vallox/binary_sensor.py | 1 - homeassistant/components/vallox/date.py | 1 - homeassistant/components/vallox/icons.json | 44 +++++++++++++++++++ homeassistant/components/vallox/number.py | 3 -- homeassistant/components/vallox/sensor.py | 6 --- homeassistant/components/vallox/switch.py | 1 - 6 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 homeassistant/components/vallox/icons.json diff --git a/homeassistant/components/vallox/binary_sensor.py b/homeassistant/components/vallox/binary_sensor.py index f919e67fa14..04d78766f40 100644 --- a/homeassistant/components/vallox/binary_sensor.py +++ b/homeassistant/components/vallox/binary_sensor.py @@ -59,7 +59,6 @@ BINARY_SENSOR_ENTITIES: tuple[ValloxBinarySensorEntityDescription, ...] = ( ValloxBinarySensorEntityDescription( key="post_heater", translation_key="post_heater", - icon="mdi:radiator", metric_key="A_CYC_IO_HEATER", ), ) diff --git a/homeassistant/components/vallox/date.py b/homeassistant/components/vallox/date.py index 43297006599..b9ea6d66015 100644 --- a/homeassistant/components/vallox/date.py +++ b/homeassistant/components/vallox/date.py @@ -20,7 +20,6 @@ class ValloxFilterChangeDateEntity(ValloxEntity, DateEntity): _attr_entity_category = EntityCategory.CONFIG _attr_translation_key = "filter_change_date" - _attr_icon = "mdi:air-filter" def __init__( self, diff --git a/homeassistant/components/vallox/icons.json b/homeassistant/components/vallox/icons.json new file mode 100644 index 00000000000..67b41d216d2 --- /dev/null +++ b/homeassistant/components/vallox/icons.json @@ -0,0 +1,44 @@ +{ + "entity": { + "binary_sensor": { + "post_heater": { + "default": "mdi:radiator" + } + }, + "date": { + "filter_change_date": { + "default": "mdi:air-filter" + } + }, + "sensor": { + "current_profile": { + "default": "mdi:gauge" + }, + "fan_speed": { + "default": "mdi:fan" + }, + "extract_fan_speed": { + "default": "mdi:fan" + }, + "supply_fan_speed": { + "default": "mdi:fan" + }, + "cell_state": { + "default": "mdi:swap-horizontal-bold" + }, + "efficiency": { + "default": "mdi:gauge" + } + }, + "switch": { + "bypass_locked": { + "default": "mdi:arrow-horizontal-lock" + } + } + }, + "services": { + "set_profile_fan_speed_home": "mdi:home", + "set_profile_fan_speed_away": "mdi:walk", + "set_profile_fan_speed_boost": "mdi:speedometer" + } +} diff --git a/homeassistant/components/vallox/number.py b/homeassistant/components/vallox/number.py index 044bc7e0a43..c9bbdda8a6a 100644 --- a/homeassistant/components/vallox/number.py +++ b/homeassistant/components/vallox/number.py @@ -77,7 +77,6 @@ NUMBER_ENTITIES: tuple[ValloxNumberEntityDescription, ...] = ( metric_key="A_CYC_HOME_AIR_TEMP_TARGET", device_class=NumberDeviceClass.TEMPERATURE, native_unit_of_measurement=UnitOfTemperature.CELSIUS, - icon="mdi:thermometer", native_min_value=5.0, native_max_value=25.0, native_step=1.0, @@ -88,7 +87,6 @@ NUMBER_ENTITIES: tuple[ValloxNumberEntityDescription, ...] = ( metric_key="A_CYC_AWAY_AIR_TEMP_TARGET", device_class=NumberDeviceClass.TEMPERATURE, native_unit_of_measurement=UnitOfTemperature.CELSIUS, - icon="mdi:thermometer", native_min_value=5.0, native_max_value=25.0, native_step=1.0, @@ -99,7 +97,6 @@ NUMBER_ENTITIES: tuple[ValloxNumberEntityDescription, ...] = ( metric_key="A_CYC_BOOST_AIR_TEMP_TARGET", device_class=NumberDeviceClass.TEMPERATURE, native_unit_of_measurement=UnitOfTemperature.CELSIUS, - icon="mdi:thermometer", native_min_value=5.0, native_max_value=25.0, native_step=1.0, diff --git a/homeassistant/components/vallox/sensor.py b/homeassistant/components/vallox/sensor.py index 79dfeae8412..45118111f58 100644 --- a/homeassistant/components/vallox/sensor.py +++ b/homeassistant/components/vallox/sensor.py @@ -138,14 +138,12 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = ( ValloxSensorEntityDescription( key="current_profile", translation_key="current_profile", - icon="mdi:gauge", entity_type=ValloxProfileSensor, ), ValloxSensorEntityDescription( key="fan_speed", translation_key="fan_speed", metric_key="A_CYC_FAN_SPEED", - icon="mdi:fan", state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, entity_type=ValloxFanSpeedSensor, @@ -154,7 +152,6 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = ( key="extract_fan_speed", translation_key="extract_fan_speed", metric_key="A_CYC_EXTR_FAN_SPEED", - icon="mdi:fan", state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, entity_type=ValloxFanSpeedSensor, @@ -164,7 +161,6 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = ( key="supply_fan_speed", translation_key="supply_fan_speed", metric_key="A_CYC_SUPP_FAN_SPEED", - icon="mdi:fan", state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, entity_type=ValloxFanSpeedSensor, @@ -179,7 +175,6 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = ( ValloxSensorEntityDescription( key="cell_state", translation_key="cell_state", - icon="mdi:swap-horizontal-bold", metric_key="A_CYC_CELL_STATE", entity_type=ValloxCellStateSensor, ), @@ -243,7 +238,6 @@ SENSOR_ENTITIES: tuple[ValloxSensorEntityDescription, ...] = ( key="efficiency", translation_key="efficiency", metric_key="A_CYC_EXTRACT_EFFICIENCY", - icon="mdi:gauge", state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, entity_registry_enabled_default=False, diff --git a/homeassistant/components/vallox/switch.py b/homeassistant/components/vallox/switch.py index fcc468c0fb2..06d791430e1 100644 --- a/homeassistant/components/vallox/switch.py +++ b/homeassistant/components/vallox/switch.py @@ -77,7 +77,6 @@ SWITCH_ENTITIES: tuple[ValloxSwitchEntityDescription, ...] = ( ValloxSwitchEntityDescription( key="bypass_locked", translation_key="bypass_locked", - icon="mdi:arrow-horizontal-lock", metric_key="A_CYC_BYPASS_LOCKED", ), )