From e4797e89ae5eedde4891510fd3ba31dbd0c289f2 Mon Sep 17 00:00:00 2001 From: Philipp Grimm Date: Tue, 14 May 2024 13:46:23 +0200 Subject: [PATCH] no config support --- custom_components/eltako/config_helpers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/custom_components/eltako/config_helpers.py b/custom_components/eltako/config_helpers.py index d6e12f3a..6493a1c8 100644 --- a/custom_components/eltako/config_helpers.py +++ b/custom_components/eltako/config_helpers.py @@ -120,7 +120,10 @@ def get_device_config(config: dict, id: int) -> dict: gateways = config[CONF_GATEWAY] for g in gateways: if g[CONF_ID] == id: - return g[CONF_DEVICES] + if CONF_DEVICES in g: + return g[CONF_DEVICES] + else: + return {} return None async def async_get_list_of_gateway_descriptions(hass: HomeAssistant, CONFIG_SCHEMA: dict, get_integration_config=async_integration_yaml_config, filter_out: list[str]=[]) -> dict: