From 4b4ee8855c509a06d3c52ab54cacae4e10d70094 Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Tue, 17 Dec 2024 09:16:42 +0000 Subject: [PATCH] Change monetary device class sensors to total --- custom_components/hildebrand_glow_ihd_mqtt/sensor.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/hildebrand_glow_ihd_mqtt/sensor.py b/custom_components/hildebrand_glow_ihd_mqtt/sensor.py index 8c45181..388344c 100755 --- a/custom_components/hildebrand_glow_ihd_mqtt/sensor.py +++ b/custom_components/hildebrand_glow_ihd_mqtt/sensor.py @@ -138,7 +138,7 @@ "name": "Smart Meter Electricity: Import Unit Rate", "device_class": SensorDeviceClass.MONETARY, "unit_of_measurement": "GBP/kWh", - "state_class": SensorStateClass.MEASUREMENT, + "state_class": SensorStateClass.TOTAL, "icon": "mdi:cash", "func": lambda js: js["electricitymeter"]["energy"]["import"]["price"][ "unitrate" @@ -149,7 +149,7 @@ "name": "Smart Meter Electricity: Import Standing Charge", "device_class": SensorDeviceClass.MONETARY, "unit_of_measurement": "GBP", - "state_class": SensorStateClass.MEASUREMENT, + "state_class": SensorStateClass.TOTAL, "icon": "mdi:cash", "func": lambda js: js["electricitymeter"]["energy"]["import"]["price"][ "standingcharge" @@ -253,7 +253,7 @@ "name": "Smart Meter Gas: Import Unit Rate", "device_class": SensorDeviceClass.MONETARY, "unit_of_measurement": "GBP/kWh", - "state_class": SensorStateClass.MEASUREMENT, + "state_class": SensorStateClass.TOTAL, "icon": "mdi:cash", "func": lambda js: js["gasmeter"]["energy"]["import"]["price"]["unitrate"], "ignore_zero_values": True, @@ -262,7 +262,7 @@ "name": "Smart Meter Gas: Import Standing Charge", "device_class": SensorDeviceClass.MONETARY, "unit_of_measurement": "GBP", - "state_class": SensorStateClass.MEASUREMENT, + "state_class": SensorStateClass.TOTAL, "icon": "mdi:cash", "func": lambda js: js["gasmeter"]["energy"]["import"]["price"][ "standingcharge"