Skip to content

Commit

Permalink
Fix EN tranlations (#40)
Browse files Browse the repository at this point in the history
* Stop using HA default referrals. Apparently they don't work for custom integrations

* Fix linter error

* Revert "Fix linter error"

This reverts commit 74c2333.
Will fix this in a seperate branch

* Fix field name error
  • Loading branch information
WebSpider authored Sep 29, 2024
1 parent e2e381f commit 33966cd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
4 changes: 1 addition & 3 deletions custom_components/myskoda/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ async def async_setup_entry(hass: HomeAssistant, config: ConfigEntry) -> bool:
myskoda = MySkoda(session, get_default_context())

try:
await myskoda.connect(
config.data["email"], config.data["password"]
)
await myskoda.connect(config.data["email"], config.data["password"])
except Exception:
_LOGGER.exception("Login with MySkoda failed.")
return False
Expand Down
4 changes: 1 addition & 3 deletions custom_components/myskoda/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ async def _on_charging_event(self, event: EventCharging):
if vehicle.driving_range is None:
await self.update_driving_range()
else:
vehicle.driving_range.primary_engine_range.current_so_c_in_percent = (
data.soc
)
vehicle.driving_range.primary_engine_range.current_soc_in_percent = data.soc
vehicle.driving_range.primary_engine_range.remaining_range_in_km = (
data.charged_range
)
Expand Down
12 changes: 6 additions & 6 deletions custom_components/myskoda/translations/en.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"config": {
"abort": {
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
"already_configured": "Device is already configured"
},
"error": {
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"invalid_auth": "[%key:common::config_flow::error::cannot_connect%]",
"unknown": "[%key:common::config_flow::error::unknown%]"
"cannot_connect": "Failed to connect",
"invalid_auth": "Invalid authentication",
"unknown": "An unexpected error occurred. Please check the HomeAssistant logfiles."
},
"step": {
"user": {
"data": {
"email": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]"
"email": "E-mail",
"password": "Password"
}
}
}
Expand Down

0 comments on commit 33966cd

Please sign in to comment.