From b7b6c1a72e6e231e295c73caf727c5ca191fc9b2 Mon Sep 17 00:00:00 2001 From: Florent Fourcot Date: Thu, 12 Feb 2026 22:39:21 +0100 Subject: [PATCH] Add more Melcloud sensors (#160770) Co-authored-by: Joostlek --- homeassistant/components/melcloud/icons.json | 3 ++ homeassistant/components/melcloud/sensor.py | 44 ++++++++++++++++++- .../components/melcloud/strings.json | 9 ++++ 3 files changed, 55 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/melcloud/icons.json b/homeassistant/components/melcloud/icons.json index b91696b5b35..7df606d4144 100644 --- a/homeassistant/components/melcloud/icons.json +++ b/homeassistant/components/melcloud/icons.json @@ -3,6 +3,9 @@ "sensor": { "energy_consumed": { "default": "mdi:factory" + }, + "fan_frequency": { + "default": "mdi:fan" } } }, diff --git a/homeassistant/components/melcloud/sensor.py b/homeassistant/components/melcloud/sensor.py index f88150ac6cd..f9bf1de42d8 100644 --- a/homeassistant/components/melcloud/sensor.py +++ b/homeassistant/components/melcloud/sensor.py @@ -15,7 +15,14 @@ from homeassistant.components.sensor import ( SensorEntityDescription, SensorStateClass, ) -from homeassistant.const import UnitOfEnergy, UnitOfTemperature +from homeassistant.const import ( + SIGNAL_STRENGTH_DECIBELS_MILLIWATT, + EntityCategory, + UnitOfEnergy, + UnitOfFrequency, + UnitOfPower, + UnitOfTemperature, +) from homeassistant.core import HomeAssistant from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback @@ -79,6 +86,41 @@ ATW_SENSORS: tuple[MelcloudSensorEntityDescription, ...] = ( value_fn=lambda x: x.device.tank_temperature, enabled=lambda x: True, ), + MelcloudSensorEntityDescription( + key="condensing_temperature", + translation_key="condensing_temperature", + native_unit_of_measurement=UnitOfTemperature.CELSIUS, + device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, + value_fn=lambda x: x.device.get_device_prop("CondensingTemperature"), + enabled=lambda x: True, + ), + MelcloudSensorEntityDescription( + key="fan_frequency", + translation_key="fan_frequency", + native_unit_of_measurement=UnitOfFrequency.HERTZ, + device_class=SensorDeviceClass.FREQUENCY, + state_class=SensorStateClass.MEASUREMENT, + value_fn=lambda x: x.device.get_device_prop("HeatPumpFrequency"), + enabled=lambda x: True, + ), + MelcloudSensorEntityDescription( + key="rssi", + entity_registry_enabled_default=False, + native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT, + device_class=SensorDeviceClass.SIGNAL_STRENGTH, + entity_category=EntityCategory.DIAGNOSTIC, + value_fn=lambda x: x.device.wifi_signal, + enabled=lambda x: True, + ), + MelcloudSensorEntityDescription( + key="energy_produced", + translation_key="energy_produced", + native_unit_of_measurement=UnitOfPower.KILO_WATT, + device_class=SensorDeviceClass.POWER, + value_fn=lambda x: x.device.get_device_prop("CurrentEnergyProduced"), + enabled=lambda x: True, + ), ) ATW_ZONE_SENSORS: tuple[MelcloudSensorEntityDescription, ...] = ( MelcloudSensorEntityDescription( diff --git a/homeassistant/components/melcloud/strings.json b/homeassistant/components/melcloud/strings.json index c8a1d14c214..0af6c7a8647 100644 --- a/homeassistant/components/melcloud/strings.json +++ b/homeassistant/components/melcloud/strings.json @@ -43,9 +43,18 @@ }, "entity": { "sensor": { + "condensing_temperature": { + "name": "Condensing temperature" + }, "energy_consumed": { "name": "Energy consumed" }, + "energy_produced": { + "name": "Energy produced" + }, + "fan_frequency": { + "name": "Fan frequency" + }, "flow_temperature": { "name": "Flow temperature" },