Skip to content

Commit

Permalink
Make charge session power/miles TOTAL_INCREASING
Browse files Browse the repository at this point in the history
I think this will make them work with HA's energy dashboard
  • Loading branch information
nshp committed Jan 22, 2024
1 parent 0d00d62 commit 18c7ed0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/lucidmotors/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 18c7ed0

Please sign in to comment.