Fix documentation URL in failed platform config check (#28814)

* Fix documentation URL in failed platform config check

* Replace pop from list by access using negative index

* Use of split instead of rsplit
This commit is contained in:
Franck Nijhof 2019-11-19 18:33:09 +01:00 committed by GitHub
parent e915dd0d95
commit 5fcfdee6b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -456,9 +456,10 @@ def _format_config_error(ex: Exception, domain: str, config: Dict) -> str:
)
if domain != CONF_CORE:
integration = domain.split(".")[-1]
message += (
"Please check the docs at "
"https://home-assistant.io/integrations/{}/".format(domain)
f"https://home-assistant.io/integrations/{integration}/"
)
return message