Skip to content

Commit

Permalink
add odometer (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpw96 authored Oct 26, 2024
1 parent 397a1ca commit 7a39fba
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions custom_components/evcc_intg/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,14 @@ class ExtSwitchEntityDescription(SwitchEntityDescription):
suggested_display_precision=0
),

ExtSensorEntityDescriptionStub(
tag=Tag.VEHICLEODOMETER,
icon="mdi:counter",
state_class=SensorStateClass.MEASUREMENT,
native_unit_of_measurement=UnitOfLength.KILOMETERS,
device_class=None,
suggested_display_precision=0
),
ExtSensorEntityDescriptionStub(
tag=Tag.VEHICLERANGE,
icon="mdi:ev-station",
Expand Down
2 changes: 1 addition & 1 deletion custom_components/evcc_intg/pyevcc_ha/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def __str__(self):
VEHICLENAME = ApiKey(key="vehicleName", type=EP_TYPE.LOADPOINTS, writeable=True, write_key = "vehicle")

# "vehicleOdometer": 0,
# ???
VEHICLEODOMETER = ApiKey(key="vehicleOdometer", type=EP_TYPE.LOADPOINTS)

# "vehicleRange": 0,
VEHICLERANGE = ApiKey(key="vehicleRange", type=EP_TYPE.LOADPOINTS)
Expand Down
1 change: 1 addition & 0 deletions custom_components/evcc_intg/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@
"sessionpriceperkwh": {"name": "Ladevorgang @@@/kWh"},
"sessionsolarpercentage": {"name": "Ladevorgang PV Verwendung"},

"vehicleodometer": {"name": "Fahrzeug Kilometerstand"},
"vehiclerange": {"name": "Fahrzeug Reichweite"},
"vehiclesoc": {"name": "Fahrzeug Ladestand"},

Expand Down
1 change: 1 addition & 0 deletions custom_components/evcc_intg/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@
"sessionpriceperkwh": {"name": "Session @@@/kWh"},
"sessionsolarpercentage": {"name": "Session Solar usage"},

"vehicleodometer": {"name": "Vehicle odometer"},
"vehiclerange": {"name": "Vehicle range"},
"vehiclesoc": {"name": "Vehicle charge"},

Expand Down

0 comments on commit 7a39fba

Please sign in to comment.