Add fuel level

This commit is contained in:
Linus Dietz
2023-06-23 12:01:14 +02:00
parent 7bbf39d8a9
commit ec8c3cea5f
3 changed files with 7 additions and 3 deletions
+2
View File
@@ -364,6 +364,8 @@ def parse_api_data(data, sensor_id=None):
return data["rearRightTyrePressure"]["value"] if keys_exists(data, "rearRightTyrePressure") else None
elif sensor_id == "engine_state":
return data["engineRunning"]["value"] if keys_exists(data, "engineRunning") else None
elif sensor_id == "fuel_level":
return data["fuelAmount"]["value"] if keys_exists(data, "fuelAmount") else None
elif sensor_id == "location":
coordinates = {}
if keys_exists(data, "geometry"):