Skip to content

Commit 5593ddf

Browse files
author
marq24
committed
added tripCabinTemperature, tripAmbientTemperature, tripOutsideAirAmbientTemperature (to last energy consumed attrs)
1 parent 5472d2b commit 5593ddf

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

custom_components/fordpass/fordpass_handler.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,6 +1184,13 @@ def get_last_energy_consumed_attrs(data, units:UnitSystem):
11841184
attrs["tripDuration"] = str(dt.parse_duration(str(tripData["trip_duration"])))
11851185
if "distance_traveled" in tripData and isinstance(tripData["distance_traveled"], Number):
11861186
attrs["tripDistanceTraveled"] = FordpassDataHandler.localize_distance(tripData["distance_traveled"], units)
1187+
if "cabin_temperature" in tripData and isinstance(tripData["cabin_temperature"], Number):
1188+
attrs["tripCabinTemperature"] = FordpassDataHandler.localize_temperature(tripData["cabin_temperature"], units)
1189+
if "ambient_temperature" in tripData and isinstance(tripData["ambient_temperature"], Number):
1190+
attrs["tripAmbientTemperature"] = FordpassDataHandler.localize_temperature(tripData["ambient_temperature"], units)
1191+
if "outside_air_ambient_temperature" in tripData and isinstance(tripData["outside_air_ambient_temperature"], Number):
1192+
attrs["tripOutsideAirAmbientTemperature"] = FordpassDataHandler.localize_temperature(tripData["outside_air_ambient_temperature"], units)
1193+
11871194
return attrs or None
11881195

11891196

custom_components/fordpass/translations/de.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
"reauth_not_possible": "Keine gültige Region gefunden\n\nDu musst die Integration leider ganz neu konfigirieren",
7171
"no_filesystem_access": "Diese Integration benötigt Zugriff auf das lokale Dateisystem Deiner Home Assistant Installation, um einen Schlüssel für Deinen FordPass™/The Lincoln Way™ Account speichern zu können.\n\nHierzu wird im in dem Ordner '.storage/' einen Unterordner anlegen. Dies ist jedoch derzeit nicht möglich. Ein interner Test ist fehlgeschlagen. Details hierzu findest Du im LOG Deiner Home Assistant Instanz.\n\nBitte stelle sicher, dass Du die Home Assistant Installation mit dem richtigen Benutzer ausführst, der Schreibzugriff auf das lokale Dateisystem hat.\n\nWenn Du Home Assistant in einem Docker-Container ausführst, stelle sicher, dass Du den Container mit dem richtigen Benutzer ausführst und dass der Container Zugriff auf das lokale Dateisystem hat.\n\nBitte prüfe Deine installation und starte die Einrichtung dieser Integration neu, sobald der Zugriff auf das lokale Dateisystem möglich ist.",
7272
"no_brand": "Kein Hersteller (Ford oder Lincoln) erkannt",
73-
"oauth_error_final": "## Der Abruf des finalen OAuth-Tokens ist fehlgeschlagen.\nBeim Anfordern des finalen Zugriffstokens von Ford ist ein Fehler aufgetreten. Bist Du sicher, dass die von Dir angegebenen Anmeldeinformationen (`client-id` und `secret`) korrekt sind?\nBitte überprüfe auch das Protokoll Deines Home Assistant auf weitere mögliche Fehlermeldungen. Diese können Dir helfen, die Ursache des Problems zu ermitteln.\n\n#### Mögliche Ursache vom Backend:\n\n{error_info}"
73+
"oauth_error_final": "## Der Abruf des finalen OAuth-Tokens ist fehlgeschlagen.\nBeim Anfordern des finalen Zugriffstokens von Ford ist ein Fehler aufgetreten. Bist Du sicher, dass die von Dir angegebenen Anmeldeinformationen (`client-id` und `secret`) korrekt sind?\nBitte überprüfe auch das Protokoll Deines Home Assistant auf weitere mögliche Fehlermeldungen. Diese können Dir helfen, die Ursache des Problems zu ermitteln.\n\n#### Mögliche Ursache vom Backend:\n\n{error_info}",
74+
"user_rejected_authorize": "## Der Benutzer hat die Autorisierung abgelehnt.\nDer Benutzer hat die Autorisierung für die Verwendung der FordConnect Query-Integration abgelehnt. Bitte überprüfe, ob Du die richtigen Anmeldeinformationen angegeben hast und versuche es erneut.\n\n#### Mögliche Ursache vom Backend:\n\n{error_info}"
7475
},
7576
"error": {
7677
"cannot_connect": "Verbindungsfehler",

custom_components/fordpass/translations/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
"reauth_not_possible": "No valid region found\n\nUnfortunately you must reconfigure the integration",
7171
"no_filesystem_access": "This integration requires access to the local file system of your HomeAssistant installation to store a key for your FordPass™/The Lincoln Way™ account.\n\nTo do this, a subfolder will be created in the '.storage/' folder. However, this is currently not possible. An internal test failed. You can find details in the log of your Home Assistant instance.\n\nPlease ensure that you are running the Home Assistant installation with the correct user who has write access to the local file system.\n\nIf you are running Home Assistant in a Docker container, ensure that you are running the container with the correct user and that the container has access to the local file system.\n\nPlease check your installation and restart the setup of this integration once access to the local file system is possible.",
7272
"no_brand": "No Brand (Ford or Lincoln) could be detected",
73-
"oauth_error_final": "## The final OAuth token retrival process failed\nSomething went wrong, when trying to request the final access token from Ford. Are you sure that the credentials you have specified as `client-id` & `secret` are correct?\nPlease also check the log of your Home Assistant for further possible error messages, that would help you to identify the root cause of this issue.\n\n#### Possible Reason:\n{error_info}"
73+
"oauth_error_final": "## The final OAuth token retrival process failed\nSomething went wrong, when trying to request the final access token from Ford. Are you sure that the credentials you have specified as `client-id` & `secret` are correct?\nPlease also check the log of your Home Assistant for further possible error messages, that would help you to identify the root cause of this issue.\n\n#### Possible Reason:\n{error_info}",
74+
"user_rejected_authorize": "## The user rejected the authorization\nThe user rejected the authorization for the use of the FordConnect Query integration. Please check if you have specified the correct credentials and try again.\n\n#### Possible Reason:\n{error_info}"
7475
},
7576
"error": {
7677
"cannot_connect": "Failed to connect",

0 commit comments

Comments
 (0)