Skip to content

Commit 631d668

Browse files
committed
v5.1.0
1 parent 38fc2f4 commit 631d668

File tree

5 files changed

+1214
-36
lines changed

5 files changed

+1214
-36
lines changed
Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
{
22
"domain": "teslemetry",
33
"name": "Teslemetry",
4-
"codeowners": ["@Bre77"],
4+
"codeowners": [
5+
"@Bre77"
6+
],
57
"config_flow": true,
6-
"dependencies": ["application_credentials"],
8+
"dependencies": [
9+
"application_credentials"
10+
],
711
"documentation": "https://www.home-assistant.io/integrations/teslemetry",
812
"integration_type": "hub",
913
"iot_class": "cloud_polling",
1014
"issue_tracker": "https://github.com/Teslemetry/hass-teslemetry/issues",
11-
"loggers": ["tesla-fleet-api"],
12-
"requirements": ["tesla-fleet-api==1.3.0", "teslemetry-stream==0.8.2"]
15+
"loggers": [
16+
"tesla-fleet-api"
17+
],
18+
"requirements": [
19+
"tesla-fleet-api==1.4.2",
20+
"teslemetry-stream==0.9.0"
21+
],
22+
"version": "5.1.0"
1323
}

homeassistant/components/teslemetry/__init__.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ async def _get_access_token(oauth_session: OAuth2Session) -> str:
111111
return oauth_session.token[CONF_ACCESS_TOKEN]
112112

113113

114-
<<<<<<< ours
115114
def beta_migration_fix(hass: HomeAssistant, entry: TeslemetryConfigEntry):
116115
"""Fix beta migration issues."""
117116
# This is needed to migrate beta users to the new OAuth credential system.
@@ -120,7 +119,8 @@ def beta_migration_fix(hass: HomeAssistant, entry: TeslemetryConfigEntry):
120119
entry,
121120
data={**entry.data, "auth_implementation": DOMAIN},
122121
)
123-
=======
122+
123+
124124
def _setup_dynamic_discovery(
125125
hass: HomeAssistant,
126126
entry: TeslemetryConfigEntry,
@@ -165,14 +165,9 @@ def _handle_metadata_update() -> None:
165165
)
166166
hass.async_create_task(hass.config_entries.async_reload(entry.entry_id))
167167

168-
<<<<<<< ours
169-
metadata_coordinator.async_add_listener(_handle_metadata_update)
170-
>>>>>>> theirs
171-
=======
172168
entry.async_on_unload(
173169
metadata_coordinator.async_add_listener(_handle_metadata_update)
174170
)
175-
>>>>>>> theirs
176171

177172

178173
async def async_setup_entry(hass: HomeAssistant, entry: TeslemetryConfigEntry) -> bool:
@@ -287,18 +282,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: TeslemetryConfigEntry) -
287282
firmware = vehicle_metadata[vin].get("firmware", "Unknown")
288283
poll = vehicle_metadata[vin].get("polling", False)
289284

290-
<<<<<<< ours
291-
entry.async_on_unload(
292-
stream.async_add_listener(
293-
create_handle_vehicle_stream(vin, coordinator),
294-
{"vin": vin},
295-
)
296-
=======
297285
# Set up stream for this vehicle
298286
remove_listener = stream.async_add_listener(
299287
create_handle_vehicle_stream(vin, coordinator),
300288
{"vin": vin},
301-
>>>>>>> theirs
302289
)
303290
stream_vehicle = stream.get_vehicle(vin)
304291

@@ -313,6 +300,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: TeslemetryConfigEntry) -
313300
vin=vin,
314301
firmware=firmware,
315302
device=device,
303+
remove_listener=remove_listener,
316304
)
317305
)
318306

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
{
22
"domain": "teslemetry",
33
"name": "Teslemetry",
4-
"codeowners": ["@Bre77"],
4+
"codeowners": [
5+
"@Bre77"
6+
],
57
"config_flow": true,
6-
"dependencies": ["application_credentials"],
8+
"dependencies": [
9+
"application_credentials"
10+
],
711
"documentation": "https://www.home-assistant.io/integrations/teslemetry",
812
"integration_type": "hub",
913
"iot_class": "cloud_polling",
1014
"issue_tracker": "https://github.com/Teslemetry/hass-teslemetry/issues",
11-
"loggers": ["tesla-fleet-api"],
12-
"requirements": ["tesla-fleet-api==1.4.2", "teslemetry-stream==0.9.0"]
15+
"loggers": [
16+
"tesla-fleet-api"
17+
],
18+
"requirements": [
19+
"tesla-fleet-api==1.4.2",
20+
"teslemetry-stream==0.9.0"
21+
],
22+
"version": "5.1.0"
1323
}

homeassistant/components/teslemetry/translations/en.json

Lines changed: 66 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"end_time": "End time",
88
"end_time_description": "The time this schedule ends, e.g. 01:05 for 1:05 AM.",
99
"location_description": "The approximate location the vehicle must be at to use this schedule. Defaults to Home Assistant's configured location.",
10+
"not_available": "Not available",
1011
"one_time": "One-time",
1112
"one_time_description": "If this is a one-time schedule.",
1213
"precondition_time": "Precondition time",
@@ -18,7 +19,6 @@
1819
"schedule_name_description": "The name of the schedule.",
1920
"start_time": "Start time",
2021
"start_time_description": "The time this schedule begins, e.g. 01:05 for 1:05 AM.",
21-
"unavailable": "Unavailable",
2222
"vehicle": "Vehicle",
2323
"vehicle_to_remove_schedule": "Vehicle to remove schedule from.",
2424
"vehicle_to_schedule": "Vehicle to schedule.",
@@ -30,10 +30,13 @@
3030
"already_configured": "Account is already configured",
3131
"oauth_error": "Received invalid token data.",
3232
"oauth_failed": "Error while obtaining access token.",
33+
"oauth_implementation_unavailable": "No OAuth2 implementations are currently available.",
3334
"oauth_timeout": "Timeout resolving OAuth token.",
3435
"oauth_unauthorized": "OAuth authorization error while obtaining access token.",
3536
"reauth_account_mismatch": "The reauthentication account does not match the original account",
36-
"reauth_successful": "Re-authentication was successful"
37+
"reauth_successful": "Re-authentication was successful",
38+
"reconfigure_account_mismatch": "The reconfiguration account does not match the original account",
39+
"reconfigure_successful": "Re-configuration was successful"
3740
},
3841
"error": {
3942
"cannot_connect": "Failed to connect",
@@ -269,6 +272,17 @@
269272
"name": "Wake"
270273
}
271274
},
275+
"calendar": {
276+
"charge_schedule_data_charge_schedules": {
277+
"name": "Charging schedule"
278+
},
279+
"tariff_content_v2": {
280+
"name": "Buy tariff"
281+
},
282+
"tariff_content_v2_sell_tariff": {
283+
"name": "Sell tariff"
284+
}
285+
},
272286
"climate": {
273287
"climate_state_cabin_overheat_protection": {
274288
"name": "Cabin overheat protection"
@@ -633,8 +647,8 @@
633647
"abort": "Abort",
634648
"enabled": "Enabled",
635649
"fault": "Fault",
636-
"standby": "Standby",
637-
"unavailable": "Unavailable"
650+
"not_available": "Not available",
651+
"standby": "Standby"
638652
}
639653
},
640654
"di_state_r": {
@@ -643,8 +657,8 @@
643657
"abort": "Abort",
644658
"enabled": "Enabled",
645659
"fault": "Fault",
646-
"standby": "Standby",
647-
"unavailable": "Unavailable"
660+
"not_available": "Not available",
661+
"standby": "Standby"
648662
}
649663
},
650664
"di_state_rel": {
@@ -653,8 +667,8 @@
653667
"abort": "Abort",
654668
"enabled": "Enabled",
655669
"fault": "Fault",
656-
"standby": "Standby",
657-
"unavailable": "Unavailable"
670+
"not_available": "Not available",
671+
"standby": "Standby"
658672
}
659673
},
660674
"di_state_rer": {
@@ -663,8 +677,8 @@
663677
"abort": "Abort",
664678
"enabled": "Enabled",
665679
"fault": "Fault",
666-
"standby": "Standby",
667-
"unavailable": "Unavailable"
680+
"not_available": "Not available",
681+
"standby": "Standby"
668682
}
669683
},
670684
"di_stator_temp_f": {
@@ -1029,9 +1043,6 @@
10291043
"vehicle_state_tpms_pressure_rr": {
10301044
"name": "Tire pressure rear right"
10311045
},
1032-
"version": {
1033-
"name": "Version"
1034-
},
10351046
"vin": {
10361047
"name": "Vehicle",
10371048
"state": {
@@ -1090,12 +1101,27 @@
10901101
}
10911102
},
10921103
"exceptions": {
1104+
"auth_failed": {
1105+
"message": "Authentication failed, please reauthenticate"
1106+
},
1107+
"auth_failed_invalid_token": {
1108+
"message": "Access token is invalid, please reauthenticate"
1109+
},
1110+
"auth_failed_migration": {
1111+
"message": "Failed to migrate to OAuth, please reauthenticate"
1112+
},
1113+
"auth_failed_subscription_required": {
1114+
"message": "Teslemetry subscription required"
1115+
},
10931116
"command_error": {
10941117
"message": "Command returned error: {error}"
10951118
},
10961119
"command_exception": {
10971120
"message": "Command returned exception: {message}"
10981121
},
1122+
"command_no_response": {
1123+
"message": "Command had no response"
1124+
},
10991125
"command_no_result": {
11001126
"message": "Command had no result"
11011127
},
@@ -1123,6 +1149,33 @@
11231149
"no_vehicle_data_for_device": {
11241150
"message": "No vehicle data for device ID: {device_id}"
11251151
},
1152+
"not_ready_api_error": {
1153+
"message": "Error communicating with Teslemetry API"
1154+
},
1155+
"not_ready_connection_error": {
1156+
"message": "Unable to connect to Teslemetry"
1157+
},
1158+
"oauth_implementation_not_available": {
1159+
"message": "OAuth implementation not available, try reauthenticating"
1160+
},
1161+
"set_scheduled_charging_time": {
1162+
"message": "Scheduled charging time is required when enabling"
1163+
},
1164+
"set_scheduled_departure_off_peak": {
1165+
"message": "Off-peak charging end time is required when enabling"
1166+
},
1167+
"set_scheduled_departure_preconditioning": {
1168+
"message": "Preconditioning departure time is required when enabling"
1169+
},
1170+
"token_data_malformed": {
1171+
"message": "Token data malformed, try reauthenticating"
1172+
},
1173+
"update_failed": {
1174+
"message": "Error fetching data from Teslemetry API"
1175+
},
1176+
"update_failed_invalid_data": {
1177+
"message": "Received invalid data from API"
1178+
},
11261179
"wake_up_failed": {
11271180
"message": "Failed to wake up vehicle: {message}"
11281181
},

0 commit comments

Comments
 (0)