Skip to content

Commit

Permalink
last update add battery data, rename current last update to odo data
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuen Lee committed Dec 24, 2023
1 parent f1d243b commit 58f1e15
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions custom_components/polestar_api/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ class PolestarSensorDescription(
dict_data=None
),
PolestarSensorDescription(
key="last_updated",
name="Last updated",
key="last_updated_odometer_data",
name="Last updated odometer data",
query="getOdometerData",
field_name="eventUpdatedTimestamp/iso",
unit=None,
Expand All @@ -305,6 +305,18 @@ class PolestarSensorDescription(
max_value=None,
dict_data=None
),
PolestarSensorDescription(
key="last_updated_battery_data",
name="Last updated battery data",
query="getBatteryData",
field_name="eventUpdatedTimestamp/iso",
unit=None,
round_digits=None,
state_class=SensorStateClass.MEASUREMENT,
device_class=SensorDeviceClass.TIMESTAMP,
max_value=None,
dict_data=None
),
PolestarSensorDescription(
key="estimate_full_charge_range_miles",
name="Calc. miles Full Charge",
Expand Down

0 comments on commit 58f1e15

Please sign in to comment.