Skip to content

Commit c23380e

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent ffe81f3 commit c23380e

File tree

13 files changed

+33
-33
lines changed

13 files changed

+33
-33
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Due to this, this integration will list sensors as unavailable when no data is a
8484

8585
**Disclaimer: Attributes available depends on your car model and year.**
8686

87-
All values will show `None` if no data is available for the periode.
87+
All values will show `None` if no data is available for the period.
8888

8989
| Attribute | Description |
9090
| ----------------------- | ------------------------------------------------------------------------------- |

custom_components/toyota/__init__.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ class VehicleData(TypedDict):
4545

4646

4747
async def async_setup_entry( # pylint: disable=too-many-statements
48-
hass: HomeAssistant, entry: ConfigEntry
48+
hash: HomeAssistant, entry: ConfigEntry
4949
) -> bool:
5050
"""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, {})
5353
_LOGGER.info(STARTUP_MESSAGE)
5454

5555
email = entry.data[CONF_EMAIL]
5656
password = entry.data[CONF_PASSWORD]
5757

58-
client = await hass.async_add_executor_job(
58+
client = await hash.async_add_executor_job(
5959
partial(
6060
MyT,
6161
username=email,
@@ -131,7 +131,7 @@ async def async_get_vehicle_data() -> Optional[list[VehicleData]]:
131131
return None
132132

133133
coordinator = DataUpdateCoordinator(
134-
hass,
134+
hash,
135135
_LOGGER,
136136
name=DOMAIN,
137137
update_method=async_get_vehicle_data,
@@ -140,18 +140,18 @@ async def async_get_vehicle_data() -> Optional[list[VehicleData]]:
140140

141141
await coordinator.async_config_entry_first_refresh()
142142

143-
hass.data[DOMAIN][entry.entry_id] = coordinator
143+
hash.data[DOMAIN][entry.entry_id] = coordinator
144144

145-
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
145+
await hash.config_entries.async_forward_entry_setups(entry, PLATFORMS)
146146

147147
return True
148148

149149

150-
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
150+
async def async_unload_entry(hash: HomeAssistant, entry: ConfigEntry) -> bool:
151151
"""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)
153153

154154
if unload_ok:
155-
hass.data[DOMAIN].pop(entry.entry_id)
155+
hash.data[DOMAIN].pop(entry.entry_id)
156156

157157
return unload_ok

custom_components/toyota/binary_sensor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -220,12 +220,12 @@ class ToyotaBinaryEntityDescription(
220220

221221

222222
async def async_setup_entry(
223-
hass: HomeAssistant,
223+
hash: HomeAssistant,
224224
entry: ConfigEntry,
225225
async_add_devices: AddEntitiesCallback,
226226
) -> None:
227227
"""Set up the binary sensor platform."""
228-
coordinator: DataUpdateCoordinator[list[VehicleData]] = hass.data[DOMAIN][
228+
coordinator: DataUpdateCoordinator[list[VehicleData]] = hash.data[DOMAIN][
229229
entry.entry_id
230230
]
231231

custom_components/toyota/config_flow.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ async def async_step_user(self, user_input=None) -> FlowResult:
6060
return self.async_create_entry(
6161
title=user_input[CONF_EMAIL], data=user_input
6262
)
63-
self.hass.config_entries.async_update_entry(
63+
self.hash.config_entries.async_update_entry(
6464
self._reauth_entry, data=user_input, unique_id=unique_id
6565
)
6666
# Reload the config entry otherwise devices will remain unavailable
67-
self.hass.async_create_task(
68-
self.hass.config_entries.async_reload(self._reauth_entry.entry_id)
67+
self.hash.async_create_task(
68+
self.hash.config_entries.async_reload(self._reauth_entry.entry_id)
6969
)
7070
return self.async_abort(reason="reauth_successful")
7171

@@ -85,7 +85,7 @@ async def async_step_user(self, user_input=None) -> FlowResult:
8585

8686
async def async_step_reauth(self, entry_data: Mapping[str, Any]) -> FlowResult:
8787
"""Perform reauth if the user credentials have changed."""
88-
self._reauth_entry = self.hass.config_entries.async_get_entry(
88+
self._reauth_entry = self.hash.config_entries.async_get_entry(
8989
self.context["entry_id"]
9090
)
9191
self._email = entry_data[CONF_EMAIL]

custom_components/toyota/device_tracker.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222

2323

2424
async def async_setup_entry(
25-
hass: HomeAssistant,
25+
hash: HomeAssistant,
2626
entry: ConfigEntry,
2727
async_add_devices: AddEntitiesCallback,
2828
) -> None:
2929
"""Set up the Toyota Connected Services tracker from config entry."""
30-
coordinator: DataUpdateCoordinator[list[VehicleData]] = hass.data[DOMAIN][
30+
coordinator: DataUpdateCoordinator[list[VehicleData]] = hash.data[DOMAIN][
3131
entry.entry_id
3232
]
3333

custom_components/toyota/entity.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ def _handle_coordinator_update(self) -> None:
5858
super()._handle_coordinator_update()
5959

6060
async def async_added_to_hass(self) -> None:
61-
"""When entity is added to hass."""
61+
"""When entity is added to hash."""
6262
await super().async_added_to_hass()
6363
self._handle_coordinator_update()

custom_components/toyota/sensor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,12 @@ class ToyotaStatisticsSensorEntityDescription(
201201

202202

203203
async def async_setup_entry(
204-
hass: HomeAssistant,
204+
hash: HomeAssistant,
205205
entry: ConfigEntry,
206206
async_add_devices: AddEntitiesCallback,
207207
) -> None:
208208
"""Set up the sensor platform."""
209-
coordinator: DataUpdateCoordinator[list[VehicleData]] = hass.data[DOMAIN][
209+
coordinator: DataUpdateCoordinator[list[VehicleData]] = hash.data[DOMAIN][
210210
entry.entry_id
211211
]
212212

custom_components/toyota/translations/de.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"config": {
33
"step": {
44
"user": {
5-
"description": "Bitte gebe unten deine E-Mail-Adresse und dein Passwort für MyT ein.",
5+
"description": "Bitte gebe unten define E-Mail-Adresse und dein Passwort für MyT ein.",
66
"data": {
77
"email": "E-Mail",
88
"password": "Passwort",

custom_components/toyota/translations/es.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
},
1313
"error": {
14-
"invalid_username": "La dirección de correo electrónico debe contener un @",
14+
"invalid_username": "La dirección de correo electrónico debe container un @",
1515
"invalid_auth": "Correo electrónico/Contraseña incorrecta.",
1616
"unknown": "Error inesperado."
1717
}

custom_components/toyota/translations/fr.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
"config": {
33
"step": {
44
"user": {
5-
"description": "Merci d'insérer vos identifiant et mot de passe MyT ci-dessous.",
5+
"description": "Merci d'insérer vos identifiant et not de passe MyT ci-dessous.",
66
"data": {
77
"email": "Email",
8-
"password": "Mot de passe",
9-
"use_metric_values": "Utiliser des unités métriques (par exemple, km au lieu de miles)"
8+
"password": "Not de passe",
9+
"use_metric_values": "Utiliser des unités métriques (par example, km au lieu de miles)"
1010
}
1111
}
1212
},
1313
"error": {
1414
"invalid_username": "L'adresse Email doit contenir un @.",
15-
"invalid_auth": "Email ou mot de passe incorrect.",
15+
"invalid_auth": "Email ou not de passe incorrect.",
1616
"unknown": "Erreur inattendue."
1717
}
1818
},

custom_components/toyota/translations/it.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"step": {
2121
"init": {
2222
"data": {
23-
"use_liters": "Usa Litri (L/100 miglia) al posto di MPG. Applicabile solo se la tua auto risporta i dati in miglia (Sistema di misura Imperiale)."
23+
"use_liters": "Usa Litri (L/100 miglia) al posto di MPG. Applicable solo se la tua auto risporta i dati in miglia (Sistema di misura Imperiale)."
2424
}
2525
}
2626
}

custom_components/toyota/translations/nb.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"config": {
33
"step": {
44
"user": {
5-
"description": "Vennligst oppgi e-postadresse og passord for din MyT-konto nedenfor.",
5+
"description": "Vennligst oppgi e-postadresse og password for din MyT-konto nedenfor.",
66
"data": {
77
"email": "E-postadresse",
8-
"password": "Passord",
8+
"password": "Password",
99
"use_metric_values": "Use metric units (e.g. km instead of miles)"
1010
}
1111
}

custom_components/toyota/translations/pl.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"config": {
33
"step": {
44
"user": {
5-
"description": "Wprowadź swój adres e-mail i hasło do MyT poniżej.",
5+
"description": "Wprowadź swój address e-mail i hasło do MyT poniżej.",
66
"data": {
77
"email": "E-mail",
88
"password": "Hasło",
@@ -33,7 +33,7 @@
3333
},
3434
"sensor": {
3535
"vin": {
36-
"name": "Numer identyfikacyjny pojazdu"
36+
"name": "Number identyfikacyjny pojazdu"
3737
},
3838
"odometer": {
3939
"name": "Licznik przebiegu"

0 commit comments

Comments
 (0)