Skip to content

Commit

Permalink
Fix loading KNX integration actions when not using YAML (#124027)
Browse files Browse the repository at this point in the history
* Fix loading KNX integration services when not using YAML

* remove unnecessary comment

* Remove unreachable test
  • Loading branch information
farmio authored and frenck committed Aug 16, 2024
1 parent 4f0261d commit def2ace
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions homeassistant/components/knx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,10 @@
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Start the KNX integration."""
hass.data[DATA_HASS_CONFIG] = config
conf: ConfigType | None = config.get(DOMAIN)

if conf is None:
# If we have a config entry, setup is done by that config entry.
# If there is no config entry, this should fail.
return bool(hass.config_entries.async_entries(DOMAIN))

conf = dict(conf)
hass.data[DATA_KNX_CONFIG] = conf
if (conf := config.get(DOMAIN)) is not None:
hass.data[DATA_KNX_CONFIG] = dict(conf)

register_knx_services(hass)

return True


Expand Down

0 comments on commit def2ace

Please sign in to comment.