From 18c7ed0206633ec570dfd471fa3fcfdbd529ec0d Mon Sep 17 00:00:00 2001 From: Nick Shipp Date: Sun, 21 Jan 2024 20:15:03 -0500 Subject: [PATCH] Make charge session power/miles TOTAL_INCREASING I think this will make them work with HA's energy dashboard --- custom_components/lucidmotors/sensor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/lucidmotors/sensor.py b/custom_components/lucidmotors/sensor.py index 9785c04..e025e9e 100644 --- a/custom_components/lucidmotors/sensor.py +++ b/custom_components/lucidmotors/sensor.py @@ -85,7 +85,7 @@ class LucidSensorEntityDescription(SensorEntityDescription): key_path=["state", "charging"], translation_key="charge_session_power", device_class=SensorDeviceClass.ENERGY, - state_class=SensorStateClass.TOTAL, + state_class=SensorStateClass.TOTAL_INCREASING, icon="mdi:battery-charging", suggested_display_precision=0, native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, @@ -95,7 +95,7 @@ class LucidSensorEntityDescription(SensorEntityDescription): key_path=["state", "charging"], translation_key="charge_session_range", device_class=SensorDeviceClass.DISTANCE, - state_class=SensorStateClass.MEASUREMENT, + state_class=SensorStateClass.TOTAL_INCREASING, icon="mdi:map-marker-distance", suggested_display_precision=0, native_unit_of_measurement=UnitOfLength.MILES,