Fix loading KNX integration actions when not using YAML (#124027)
* Fix loading KNX integration services when not using YAML * remove unnecessary comment * Remove unreachable test
This commit is contained in:
parent
799e95c1bd
commit
ea52acd7bd
1 changed files with 2 additions and 10 deletions
|
@ -147,18 +147,10 @@ CONFIG_SCHEMA = vol.Schema(
|
||||||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
"""Start the KNX integration."""
|
"""Start the KNX integration."""
|
||||||
hass.data[DATA_HASS_CONFIG] = config
|
hass.data[DATA_HASS_CONFIG] = config
|
||||||
conf: ConfigType | None = config.get(DOMAIN)
|
if (conf := config.get(DOMAIN)) is not None:
|
||||||
|
hass.data[DATA_KNX_CONFIG] = dict(conf)
|
||||||
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
|
|
||||||
|
|
||||||
register_knx_services(hass)
|
register_knx_services(hass)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue