From 12ad6b8a2bdeb95085128a23d3f5f78d9363e605 Mon Sep 17 00:00:00 2001 From: JasperPlant <78851352+JasperPlant@users.noreply.github.com> Date: Fri, 20 Aug 2021 14:08:28 +0200 Subject: [PATCH] Add growatt total state_class for storage (#54913) --- homeassistant/components/growatt_server/sensor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/growatt_server/sensor.py b/homeassistant/components/growatt_server/sensor.py index 9e1fec2e144..fb271afb68a 100644 --- a/homeassistant/components/growatt_server/sensor.py +++ b/homeassistant/components/growatt_server/sensor.py @@ -272,6 +272,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = ( api_key="eBatDisChargeTotal", native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, device_class=DEVICE_CLASS_ENERGY, + state_class=STATE_CLASS_TOTAL_INCREASING, ), GrowattSensorEntityDescription( key="storage_grid_discharge_today", @@ -293,6 +294,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = ( api_key="eopDischrTotal", native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, device_class=DEVICE_CLASS_ENERGY, + state_class=STATE_CLASS_TOTAL_INCREASING, ), GrowattSensorEntityDescription( key="storage_grid_charged_today", @@ -307,6 +309,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = ( api_key="eChargeTotal", native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, device_class=DEVICE_CLASS_ENERGY, + state_class=STATE_CLASS_TOTAL_INCREASING, ), GrowattSensorEntityDescription( key="storage_solar_production", @@ -362,6 +365,7 @@ STORAGE_SENSOR_TYPES: tuple[GrowattSensorEntityDescription, ...] = ( api_key="eToUserTotal", native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, device_class=DEVICE_CLASS_ENERGY, + state_class=STATE_CLASS_TOTAL_INCREASING, ), GrowattSensorEntityDescription( key="storage_load_consumption",