mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Toon translation updates + tweaks (#37043)
This commit is contained in:
parent
ed89d4869d
commit
c289f9f099
@ -146,14 +146,17 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
await hass.data[DOMAIN][entry.entry_id].unregister_webhook()
|
||||
|
||||
# Unload entities for this entry/device.
|
||||
await asyncio.gather(
|
||||
*(
|
||||
hass.config_entries.async_forward_entry_unload(entry, component)
|
||||
for component in ENTITY_COMPONENTS
|
||||
unload_ok = all(
|
||||
await asyncio.gather(
|
||||
*(
|
||||
hass.config_entries.async_forward_entry_unload(entry, component)
|
||||
for component in ENTITY_COMPONENTS
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
# Cleanup
|
||||
del hass.data[DOMAIN][entry.entry_id]
|
||||
if unload_ok:
|
||||
del hass.data[DOMAIN][entry.entry_id]
|
||||
|
||||
return True
|
||||
return unload_ok
|
||||
|
@ -1,33 +1,23 @@
|
||||
{
|
||||
"config": {
|
||||
"step": {
|
||||
"authenticate": {
|
||||
"title": "Link your Toon account",
|
||||
"description": "Authenticate with your Eneco Toon account (not the developer account).",
|
||||
"data": {
|
||||
"username": "[%key:common::config_flow::data::username%]",
|
||||
"password": "[%key:common::config_flow::data::password%]",
|
||||
"tenant": "Tenant"
|
||||
}
|
||||
"pick_implementation": {
|
||||
"title": "Choose your tenant to authenticate with"
|
||||
},
|
||||
"display": {
|
||||
"title": "Select display",
|
||||
"description": "Select the Toon display to connect with.",
|
||||
"agreement": {
|
||||
"title": "Select your agreement",
|
||||
"description": "Select the agreement address you want to add.",
|
||||
"data": {
|
||||
"display": "Choose display"
|
||||
"agreement": "Agreement"
|
||||
}
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"credentials": "The provided credentials are invalid.",
|
||||
"display_exists": "The selected display is already configured."
|
||||
},
|
||||
"abort": {
|
||||
"client_id": "The client ID from the configuration is invalid.",
|
||||
"client_secret": "The client secret from the configuration is invalid.",
|
||||
"unknown_auth_fail": "Unexpected error occurred, while authenticating.",
|
||||
"no_agreements": "This account has no Toon displays.",
|
||||
"no_app": "You need to configure Toon before being able to authenticate with it. [Please read the instructions](https://www.home-assistant.io/components/toon/)."
|
||||
"already_configured": "The selected agreement is already configured.",
|
||||
"authorize_url_fail": "Unknown error generating an authorize url.",
|
||||
"authorize_url_timeout": "[%key:common::config_flow::abort::oauth2_authorize_url_timeout%]",
|
||||
"missing_configuration": "[%key:common::config_flow::abort::oauth2_missing_configuration%]",
|
||||
"no_agreements": "This account has no Toon displays."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -59,9 +59,7 @@ class ToonSwitch(ToonEntity, SwitchEntity):
|
||||
def unique_id(self) -> str:
|
||||
"""Return the unique ID for this binary sensor."""
|
||||
agreement_id = self.coordinator.data.agreement.agreement_id
|
||||
# This unique ID is a bit ugly and contains unneeded information.
|
||||
# It is here for legacy / backward compatible reasons.
|
||||
return f"{DOMAIN}_{agreement_id}_switch_{self.key}"
|
||||
return f"{agreement_id}_{self.key}"
|
||||
|
||||
@property
|
||||
def is_on(self) -> bool:
|
||||
|
Loading…
x
Reference in New Issue
Block a user