mirror of
https://github.com/elisspace/core.git
synced 2026-09-29 22:09:55 +00:00
Various string cleanups (#30435)
* Remove some unnecessary string concatenations * Replace some simple str.formats with f-strings * Replace some string concatenations with f-strings
This commit is contained in:
committed by
Paulus Schoutsen
parent
5ad209c6fd
commit
fa4fa30461
@@ -279,7 +279,7 @@ class DeviceBroker:
|
||||
capabilities = device.capabilities.copy()
|
||||
slots = {}
|
||||
for platform_name in SUPPORTED_PLATFORMS:
|
||||
platform = importlib.import_module("." + platform_name, self.__module__)
|
||||
platform = importlib.import_module(f".{platform_name}", self.__module__)
|
||||
if not hasattr(platform, "get_capabilities"):
|
||||
continue
|
||||
assigned = platform.get_capabilities(capabilities)
|
||||
|
||||
@@ -109,7 +109,7 @@ def get_webhook_url(hass: HomeAssistantType) -> str:
|
||||
|
||||
|
||||
def _get_app_template(hass: HomeAssistantType):
|
||||
endpoint = "at " + hass.config.api.base_url
|
||||
endpoint = f"at {hass.config.api.base_url}"
|
||||
cloudhook_url = hass.data[DOMAIN][CONF_CLOUDHOOK_URL]
|
||||
if cloudhook_url is not None:
|
||||
endpoint = "via Nabu Casa"
|
||||
|
||||
Reference in New Issue
Block a user