From ae38cb414365a1b0211e4b71130fad3b1a85d5ec Mon Sep 17 00:00:00 2001 From: marq24 Date: Fri, 4 Oct 2024 16:13:53 +0200 Subject: [PATCH] define state_class for all Sensors 2024.10.0 --- .../waterkotte_heatpump/const.py | 91 ++++++++++++++++--- .../waterkotte_heatpump/manifest.json | 2 +- .../waterkotte_heatpump/translations/de.json | 4 +- .../waterkotte_heatpump/translations/en.json | 4 +- 4 files changed, 83 insertions(+), 18 deletions(-) diff --git a/custom_components/waterkotte_heatpump/const.py b/custom_components/waterkotte_heatpump/const.py index 3c90c29..72c2b71 100644 --- a/custom_components/waterkotte_heatpump/const.py +++ b/custom_components/waterkotte_heatpump/const.py @@ -1251,6 +1251,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_OUTSIDE", tag=WKHPTag.TEMPERATURE_OUTSIDE, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:sun-snowflake-variant", entity_registry_enabled_default=True @@ -1259,6 +1260,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_OUTSIDE_1H", tag=WKHPTag.TEMPERATURE_OUTSIDE_1H, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:sun-snowflake-variant", entity_registry_enabled_default=True @@ -1267,6 +1269,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_OUTSIDE_24H", tag=WKHPTag.TEMPERATURE_OUTSIDE_24H, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:sun-snowflake-variant", entity_registry_enabled_default=True @@ -1275,6 +1278,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_SOURCE_ENTRY", tag=WKHPTag.TEMPERATURE_SOURCE_ENTRY, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermometer", entity_registry_enabled_default=True @@ -1283,6 +1287,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_SOURCE_EXIT", tag=WKHPTag.TEMPERATURE_SOURCE_EXIT, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermometer", entity_registry_enabled_default=True @@ -1291,6 +1296,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_EVAPORATION", tag=WKHPTag.TEMPERATURE_EVAPORATION, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermometer", entity_registry_enabled_default=True @@ -1299,6 +1305,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_SUCTION_LINE", tag=WKHPTag.TEMPERATURE_SUCTION_LINE, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermometer", entity_registry_enabled_default=True @@ -1307,6 +1314,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_RETURN", tag=WKHPTag.TEMPERATURE_RETURN, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermometer", entity_registry_enabled_default=True @@ -1315,6 +1323,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_FLOW", tag=WKHPTag.TEMPERATURE_FLOW, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermometer", entity_registry_enabled_default=True @@ -1323,6 +1332,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_CONDENSATION", tag=WKHPTag.TEMPERATURE_CONDENSATION, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermometer", entity_registry_enabled_default=True @@ -1331,6 +1341,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_BUFFERTANK", tag=WKHPTag.TEMPERATURE_BUFFERTANK, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:storage-tank", entity_registry_enabled_default=True @@ -1339,6 +1350,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_ROOM", tag=WKHPTag.TEMPERATURE_ROOM, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermostat-box", entity_registry_enabled_default=False @@ -1347,6 +1359,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_ROOM_1H", tag=WKHPTag.TEMPERATURE_ROOM_1H, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermostat-box", entity_registry_enabled_default=False @@ -1355,6 +1368,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_HEATING", tag=WKHPTag.TEMPERATURE_HEATING, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:radiator", entity_registry_enabled_default=True @@ -1363,6 +1377,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_HEATING_DEMAND", tag=WKHPTag.TEMPERATURE_HEATING_DEMAND, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:radiator", entity_registry_enabled_default=True @@ -1371,6 +1386,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_COOLING", tag=WKHPTag.TEMPERATURE_COOLING, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:snowflake-thermometer", entity_registry_enabled_default=False @@ -1379,6 +1395,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_COOLING_DEMAND", tag=WKHPTag.TEMPERATURE_COOLING_DEMAND, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:snowflake-thermometer", entity_registry_enabled_default=False @@ -1387,6 +1404,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_WATER", tag=WKHPTag.TEMPERATURE_WATER, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:water-thermometer", entity_registry_enabled_default=True @@ -1395,6 +1413,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_WATER_DEMAND", tag=WKHPTag.TEMPERATURE_WATER_DEMAND, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:water-thermometer", entity_registry_enabled_default=True @@ -1403,6 +1422,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_MIX1", tag=WKHPTag.TEMPERATURE_MIX1, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:numeric-1-circle", entity_registry_enabled_default=True @@ -1411,6 +1431,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_MIX1_PERCENT", tag=WKHPTag.TEMPERATURE_MIX1_PERCENT, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, icon="mdi:gauge", entity_registry_enabled_default=False @@ -1419,6 +1440,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_MIX1_DEMAND", tag=WKHPTag.TEMPERATURE_MIX1_DEMAND, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:numeric-1-circle", entity_registry_enabled_default=True @@ -1427,6 +1449,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_MIX2", tag=WKHPTag.TEMPERATURE_MIX2, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:numeric-2-circle", entity_registry_enabled_default=False @@ -1435,6 +1458,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_MIX2_PERCENT", tag=WKHPTag.TEMPERATURE_MIX2_PERCENT, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, icon="mdi:gauge", entity_registry_enabled_default=False @@ -1443,6 +1467,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_MIX2_DEMAND", tag=WKHPTag.TEMPERATURE_MIX2_DEMAND, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:numeric-2-circle", entity_registry_enabled_default=False @@ -1451,6 +1476,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_MIX3", tag=WKHPTag.TEMPERATURE_MIX3, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:numeric-3-circle", entity_registry_enabled_default=False @@ -1459,6 +1485,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_MIX3_PERCENT", tag=WKHPTag.TEMPERATURE_MIX3_PERCENT, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, icon="mdi:gauge", entity_registry_enabled_default=False @@ -1467,6 +1494,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_MIX3_DEMAND", tag=WKHPTag.TEMPERATURE_MIX3_DEMAND, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:numeric-3-circle", entity_registry_enabled_default=False @@ -1475,6 +1503,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_POOL", tag=WKHPTag.TEMPERATURE_POOL, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:pool-thermometer", entity_registry_enabled_default=False, @@ -1484,6 +1513,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_POOL_DEMAND", tag=WKHPTag.TEMPERATURE_POOL_DEMAND, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:pool-thermometer", entity_registry_enabled_default=False, @@ -1493,6 +1523,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_SOLAR", tag=WKHPTag.TEMPERATURE_SOLAR, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:solar-power-variant", entity_registry_enabled_default=False @@ -1501,6 +1532,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_SOLAR_EXIT", tag=WKHPTag.TEMPERATURE_SOLAR_EXIT, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:solar-power-variant", entity_registry_enabled_default=False @@ -1509,6 +1541,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="TEMPERATURE_DISCHARGE", tag=WKHPTag.TEMPERATURE_DISCHARGE, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermometer", entity_registry_enabled_default=False @@ -1518,6 +1551,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="PRESSURE_EVAPORATION", tag=WKHPTag.PRESSURE_EVAPORATION, device_class=SensorDeviceClass.PRESSURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPressure.BAR, icon="mdi:gauge", entity_registry_enabled_default=True @@ -1526,6 +1560,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="PRESSURE_CONDENSATION", tag=WKHPTag.PRESSURE_CONDENSATION, device_class=SensorDeviceClass.PRESSURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPressure.BAR, icon="mdi:gauge", entity_registry_enabled_default=True @@ -1534,6 +1569,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="PRESSURE_WATER", tag=WKHPTag.PRESSURE_WATER, device_class=SensorDeviceClass.PRESSURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPressure.BAR, icon="mdi:gauge", entity_registry_enabled_default=False @@ -1543,6 +1579,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="POSITION_EXPANSION_VALVE", tag=WKHPTag.POSITION_EXPANSION_VALVE, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, icon="mdi:gauge", entity_registry_enabled_default=True @@ -1551,6 +1588,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="SUCTION_GAS_OVERHEATING", tag=WKHPTag.SUCTION_GAS_OVERHEATING, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, icon="mdi:gauge", entity_registry_enabled_default=True @@ -1559,6 +1597,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="POWER_ELECTRIC", tag=WKHPTag.POWER_ELECTRIC, device_class=SensorDeviceClass.POWER, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPower.KILO_WATT, icon="mdi:meter-electric", entity_registry_enabled_default=True @@ -1567,6 +1606,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="POWER_HEATING", tag=WKHPTag.POWER_HEATING, device_class=SensorDeviceClass.POWER, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPower.KILO_WATT, icon="mdi:radiator", entity_registry_enabled_default=True @@ -1575,6 +1615,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="POWER_COOLING", tag=WKHPTag.POWER_COOLING, device_class=SensorDeviceClass.POWER, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPower.KILO_WATT, icon="mdi:snowflake-thermometer", entity_registry_enabled_default=True @@ -1583,6 +1624,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="COP_HEATING", tag=WKHPTag.COP_HEATING, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=None, icon="mdi:gauge", entity_registry_enabled_default=True @@ -1591,6 +1633,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="COP_COOLING", tag=WKHPTag.COP_COOLING, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=None, icon="mdi:gauge", entity_registry_enabled_default=True @@ -1599,80 +1642,80 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="ENERGY_CONSUMPTION_TOTAL_YEAR", tag=WKHPTag.ENERGY_CONSUMPTION_TOTAL_YEAR, device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, icon="mdi:lightning-bolt-outline", entity_registry_enabled_default=True, - state_class=SensorStateClass.TOTAL_INCREASING, suggested_display_precision=3 ), ExtSensorEntityDescription( key="COMPRESSOR_ELECTRIC_CONSUMPTION_YEAR", tag=WKHPTag.COMPRESSOR_ELECTRIC_CONSUMPTION_YEAR, device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, icon="mdi:gauge", entity_registry_enabled_default=True, - state_class=SensorStateClass.TOTAL_INCREASING, suggested_display_precision=3 ), ExtSensorEntityDescription( key="SOURCEPUMP_ELECTRIC_CONSUMPTION_YEAR", tag=WKHPTag.SOURCEPUMP_ELECTRIC_CONSUMPTION_YEAR, device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, icon="mdi:water-pump", entity_registry_enabled_default=False, - state_class=SensorStateClass.TOTAL_INCREASING, suggested_display_precision=3 ), ExtSensorEntityDescription( key="ELECTRICAL_HEATER_ELECTRIC_CONSUMPTION_YEAR", tag=WKHPTag.ELECTRICAL_HEATER_ELECTRIC_CONSUMPTION_YEAR, device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, icon="mdi:heating-coil", entity_registry_enabled_default=True, - state_class=SensorStateClass.TOTAL_INCREASING, suggested_display_precision=3 ), ExtSensorEntityDescription( key="ENERGY_PRODUCTION_TOTAL_YEAR", tag=WKHPTag.ENERGY_PRODUCTION_TOTAL_YEAR, device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, icon="mdi:home-thermometer-outline", entity_registry_enabled_default=True, - state_class=SensorStateClass.TOTAL_INCREASING, suggested_display_precision=3 ), ExtSensorEntityDescription( key="HEATING_ENERGY_PRODUCTION_YEAR", tag=WKHPTag.HEATING_ENERGY_PRODUCTION_YEAR, device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, icon="mdi:radiator", entity_registry_enabled_default=True, - state_class=SensorStateClass.TOTAL_INCREASING, suggested_display_precision=3 ), ExtSensorEntityDescription( key="HOT_WATER_ENERGY_PRODUCTION_YEAR", tag=WKHPTag.HOT_WATER_ENERGY_PRODUCTION_YEAR, device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, icon="mdi:water-thermometer", entity_registry_enabled_default=True, - state_class=SensorStateClass.TOTAL_INCREASING, suggested_display_precision=3 ), ExtSensorEntityDescription( key="POOL_ENERGY_PRODUCTION_YEAR", tag=WKHPTag.POOL_ENERGY_PRODUCTION_YEAR, device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, icon="mdi:pool-thermometer", entity_registry_enabled_default=False, - state_class=SensorStateClass.TOTAL_INCREASING, suggested_display_precision=3, feature=FEATURE_POOL ), @@ -1680,16 +1723,17 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="COOLING_ENERGY_YEAR", tag=WKHPTag.COOLING_ENERGY_YEAR, device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.TOTAL_INCREASING, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, icon="mdi:snowflake-thermometer", entity_registry_enabled_default=True, - state_class=SensorStateClass.TOTAL_INCREASING, suggested_display_precision=3 ), ExtSensorEntityDescription( key="PERCENT_HEAT_CIRC_PUMP", tag=WKHPTag.PERCENT_HEAT_CIRC_PUMP, device_class=SensorDeviceClass.POWER_FACTOR, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, icon="mdi:gauge", entity_registry_enabled_default=True @@ -1698,6 +1742,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="PERCENT_SOURCE_PUMP", tag=WKHPTag.PERCENT_SOURCE_PUMP, device_class=SensorDeviceClass.POWER_FACTOR, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, icon="mdi:gauge", entity_registry_enabled_default=True @@ -1706,6 +1751,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="PERCENT_COMPRESSOR", tag=WKHPTag.PERCENT_COMPRESSOR, device_class=SensorDeviceClass.POWER_FACTOR, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, icon="mdi:gauge", entity_registry_enabled_default=True @@ -1713,8 +1759,8 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): ExtSensorEntityDescription( key="WATERKOTTE_BIOS_TIME", tag=WKHPTag.WATERKOTTE_BIOS_TIME, - state_class=None, device_class=SensorDeviceClass.DATE, + state_class=None, native_unit_of_measurement=None, icon="mdi:clock-digital", entity_category=EntityCategory.DIAGNOSTIC, @@ -1723,8 +1769,8 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): ExtSensorEntityDescription( key="HOLIDAY_START_TIME", tag=WKHPTag.HOLIDAY_START_TIME, - state_class=None, device_class=SensorDeviceClass.DATE, + state_class=None, native_unit_of_measurement=None, icon="mdi:calendar-arrow-right", entity_registry_enabled_default=True @@ -1732,8 +1778,8 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): ExtSensorEntityDescription( key="HOLIDAY_END_TIME", tag=WKHPTag.HOLIDAY_END_TIME, - state_class=None, device_class=SensorDeviceClass.DATE, + state_class=None, native_unit_of_measurement=None, icon="mdi:calendar-arrow-left", entity_registry_enabled_default=True @@ -1741,8 +1787,8 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): ExtSensorEntityDescription( key="SCHEDULE_WATER_DISINFECTION_START_TIME", tag=WKHPTag.SCHEDULE_WATER_DISINFECTION_START_TIME, - state_class=None, device_class=SensorDeviceClass.DATE, + state_class=None, native_unit_of_measurement=None, icon="mdi:clock-digital", entity_registry_enabled_default=False, @@ -1752,6 +1798,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="STATE_SERVICE", tag=WKHPTag.STATE_SERVICE, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=None, icon="mdi:wrench-clock", entity_registry_enabled_default=True @@ -1760,6 +1807,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="ALARM_BITS", tag=WKHPTag.ALARM_BITS, device_class=None, + state_class=None, native_unit_of_measurement=None, icon="mdi:alarm-light", entity_registry_enabled_default=True @@ -1768,6 +1816,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="INTERRUPTION_BITS", tag=WKHPTag.INTERRUPTION_BITS, device_class=None, + state_class=None, native_unit_of_measurement=None, icon="mdi:alert-circle", entity_registry_enabled_default=True @@ -1777,6 +1826,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_TEMPERATURE_OUTGOING_AIR_BEFORE_ETH_A4998", tag=WKHPTag.BASICVENT_TEMPERATURE_OUTGOING_AIR_BEFORE_ETH_A4998, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermometer", entity_registry_enabled_default=False, @@ -1787,6 +1837,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_TEMPERATURE_OUTGOING_AIR_AFTER_EEH_A4994", tag=WKHPTag.BASICVENT_TEMPERATURE_OUTGOING_AIR_AFTER_EEH_A4994, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermometer", entity_registry_enabled_default=False, @@ -1797,6 +1848,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_TEMPERATURE_INCOMING_AIR_BEFORE_ODA_A5000", tag=WKHPTag.BASICVENT_TEMPERATURE_INCOMING_AIR_BEFORE_ODA_A5000, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermometer", entity_registry_enabled_default=False, @@ -1807,6 +1859,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_TEMPERATURE_INCOMING_AIR_AFTER_SUP_A4996", tag=WKHPTag.BASICVENT_TEMPERATURE_INCOMING_AIR_AFTER_SUP_A4996, device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTemperature.CELSIUS, icon="mdi:thermometer", entity_registry_enabled_default=False, @@ -1817,6 +1870,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_FILTER_CHANGE_OPERATING_DAYS_A4498", tag=WKHPTag.BASICVENT_FILTER_CHANGE_OPERATING_DAYS_A4498, device_class=SensorDeviceClass.DURATION, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTime.DAYS, unit_of_measurement=UnitOfTime.DAYS, icon="mdi:counter", @@ -1828,6 +1882,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_FILTER_CHANGE_REMAINING_OPERATING_DAYS_A4504", tag=WKHPTag.BASICVENT_FILTER_CHANGE_REMAINING_OPERATING_DAYS_A4504, device_class=SensorDeviceClass.DURATION, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfTime.DAYS, unit_of_measurement=UnitOfTime.DAYS, icon="mdi:counter", @@ -1839,6 +1894,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_HUMIDITY_VALUE_A4990", tag=WKHPTag.BASICVENT_HUMIDITY_VALUE_A4990, device_class=SensorDeviceClass.HUMIDITY, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, icon="mdi:cloud-percent", entity_registry_enabled_default=False, @@ -1849,6 +1905,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_CO2_VALUE_A4992", tag=WKHPTag.BASICVENT_CO2_VALUE_A4992, device_class=SensorDeviceClass.CO2, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, icon="mdi:molecule-co2", entity_registry_enabled_default=False, @@ -1859,6 +1916,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_VOC_VALUE_A4522", tag=WKHPTag.BASICVENT_VOC_VALUE_A4522, device_class=SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, icon="mdi:counter", entity_registry_enabled_default=False, @@ -1869,6 +1927,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_INCOMING_FAN_RPM_A4551", tag=WKHPTag.BASICVENT_INCOMING_FAN_RPM_A4551, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, icon="mdi:wind-power", entity_registry_enabled_default=False, @@ -1879,6 +1938,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_INCOMING_FAN_A4986", tag=WKHPTag.BASICVENT_INCOMING_FAN_A4986, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, icon="mdi:wind-power", entity_registry_enabled_default=False, @@ -1889,6 +1949,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_OUTGOING_FAN_RPM_A4547", tag=WKHPTag.BASICVENT_OUTGOING_FAN_RPM_A4547, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=REVOLUTIONS_PER_MINUTE, icon="mdi:wind-power", entity_registry_enabled_default=False, @@ -1899,6 +1960,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_OUTGOING_FAN_A4984", tag=WKHPTag.BASICVENT_OUTGOING_FAN_A4984, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, icon="mdi:wind-power", entity_registry_enabled_default=False, @@ -1909,6 +1971,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_ENERGY_SAVE_TOTAL_A4387", tag=WKHPTag.BASICVENT_ENERGY_SAVE_TOTAL_A4387, device_class=SensorDeviceClass.ENERGY, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, icon="mdi:home-lightning-bolt", entity_registry_enabled_default=False, @@ -1919,6 +1982,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_ENERGY_SAVE_CURRENT_A4389", tag=WKHPTag.BASICVENT_ENERGY_SAVE_CURRENT_A4389, device_class=SensorDeviceClass.POWER, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=UnitOfPower.WATT, icon="mdi:home-lightning-bolt", entity_registry_enabled_default=False, @@ -1929,6 +1993,7 @@ class ExtSwitchEntityDescription(SwitchEntityDescription): key="BASICVENT_ENERGY_RECOVERY_RATE_A4391", tag=WKHPTag.BASICVENT_ENERGY_RECOVERY_RATE_A4391, device_class=None, + state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=PERCENTAGE, icon="mdi:gauge", entity_registry_enabled_default=False, diff --git a/custom_components/waterkotte_heatpump/manifest.json b/custom_components/waterkotte_heatpump/manifest.json index 4bb22fd..0b9ac13 100644 --- a/custom_components/waterkotte_heatpump/manifest.json +++ b/custom_components/waterkotte_heatpump/manifest.json @@ -11,5 +11,5 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/marq24/ha-waterkotte/issues", "requirements": [], - "version": "2024.9.1" + "version": "2024.10.0" } diff --git a/custom_components/waterkotte_heatpump/translations/de.json b/custom_components/waterkotte_heatpump/translations/de.json index 84e3ca9..54061a9 100644 --- a/custom_components/waterkotte_heatpump/translations/de.json +++ b/custom_components/waterkotte_heatpump/translations/de.json @@ -2,8 +2,8 @@ "selector": { "system_type": { "options": { - "ecotouch": "EcoTouch Modus [es werden Zugangsdaten zur Anmeldung benötigt]", - "easycon": "EasyCon Modus [älter Waterkotte Modelle (ohne Zugangsdaten)]" + "ecotouch": "EcoTouch Modus [es werden Zugangsdaten in einem Anmeldeformular benötigt]", + "easycon": "EasyCon Modus [älter Waterkotte Modelle (mit Basic-Auth Zugangsdaten)]" } }, "set_schedule_data_schedule_type": { diff --git a/custom_components/waterkotte_heatpump/translations/en.json b/custom_components/waterkotte_heatpump/translations/en.json index 1a3edbf..143d75f 100644 --- a/custom_components/waterkotte_heatpump/translations/en.json +++ b/custom_components/waterkotte_heatpump/translations/en.json @@ -2,8 +2,8 @@ "selector": { "system_type": { "options": { - "ecotouch": "EcoTouch Mode [web interface require username & password]", - "easycon": "EasyCon Mode [older Waterkotte Models without login credentials]" + "ecotouch": "EcoTouch Mode [web-form interface require username & password]", + "easycon": "EasyCon Mode [older Waterkotte Models with basic-auth login]" } }, "set_schedule_data_schedule_type": {