@@ -45,17 +45,17 @@ class VehicleData(TypedDict):
45
45
46
46
47
47
async def async_setup_entry ( # pylint: disable=too-many-statements
48
- hass : HomeAssistant , entry : ConfigEntry
48
+ hash : HomeAssistant , entry : ConfigEntry
49
49
) -> bool :
50
50
"""Set up Toyota Connected Services from a config entry."""
51
- if hass .data .get (DOMAIN ) is None :
52
- hass .data .setdefault (DOMAIN , {})
51
+ if hash .data .get (DOMAIN ) is None :
52
+ hash .data .setdefault (DOMAIN , {})
53
53
_LOGGER .info (STARTUP_MESSAGE )
54
54
55
55
email = entry .data [CONF_EMAIL ]
56
56
password = entry .data [CONF_PASSWORD ]
57
57
58
- client = await hass .async_add_executor_job (
58
+ client = await hash .async_add_executor_job (
59
59
partial (
60
60
MyT ,
61
61
username = email ,
@@ -131,7 +131,7 @@ async def async_get_vehicle_data() -> Optional[list[VehicleData]]:
131
131
return None
132
132
133
133
coordinator = DataUpdateCoordinator (
134
- hass ,
134
+ hash ,
135
135
_LOGGER ,
136
136
name = DOMAIN ,
137
137
update_method = async_get_vehicle_data ,
@@ -140,18 +140,18 @@ async def async_get_vehicle_data() -> Optional[list[VehicleData]]:
140
140
141
141
await coordinator .async_config_entry_first_refresh ()
142
142
143
- hass .data [DOMAIN ][entry .entry_id ] = coordinator
143
+ hash .data [DOMAIN ][entry .entry_id ] = coordinator
144
144
145
- await hass .config_entries .async_forward_entry_setups (entry , PLATFORMS )
145
+ await hash .config_entries .async_forward_entry_setups (entry , PLATFORMS )
146
146
147
147
return True
148
148
149
149
150
- async def async_unload_entry (hass : HomeAssistant , entry : ConfigEntry ) -> bool :
150
+ async def async_unload_entry (hash : HomeAssistant , entry : ConfigEntry ) -> bool :
151
151
"""Unload a config entry."""
152
- unload_ok = await hass .config_entries .async_unload_platforms (entry , PLATFORMS )
152
+ unload_ok = await hash .config_entries .async_unload_platforms (entry , PLATFORMS )
153
153
154
154
if unload_ok :
155
- hass .data [DOMAIN ].pop (entry .entry_id )
155
+ hash .data [DOMAIN ].pop (entry .entry_id )
156
156
157
157
return unload_ok
0 commit comments