Use common strings in Tibber config flow (#41837)

This commit is contained in:
scheric 2020-10-14 21:10:37 +02:00 committed by GitHub
parent 70eebc7211
commit 78c0871ae5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -48,7 +48,7 @@ class TibberConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
except asyncio.TimeoutError:
errors[CONF_ACCESS_TOKEN] = "timeout"
except aiohttp.ClientError:
errors[CONF_ACCESS_TOKEN] = "connection_error"
errors[CONF_ACCESS_TOKEN] = "cannot_connect"
except tibber.InvalidLogin:
errors[CONF_ACCESS_TOKEN] = "invalid_access_token"

View file

@ -6,7 +6,7 @@
},
"error": {
"timeout": "Timeout connecting to Tibber",
"connection_error": "[%key:common::config_flow::error::cannot_connect%]",
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
"invalid_access_token": "[%key:common::config_flow::error::invalid_access_token%]"
},
"step": {