Skip to content

Commit

Permalink
add last updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuen Lee committed Nov 18, 2023
1 parent 2b052b7 commit c1d7d40
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions custom_components/polestar_api/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ class PolestarSensorDescription(
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.BATTERY,
),
PolestarSensorDescription(
key="last_updated",
name="Last updated",
path="{vin}/recharge-status",
response_path="batteryChargeLevel.timestamp",
unit=None,
round_digits=None,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.TIMESTAMP,
),
PolestarSensorDescription(
key="electric_range",
name="EV Range",
Expand Down

0 comments on commit c1d7d40

Please sign in to comment.