Allow input_* and timer component setup without config (#30772)
* Allow input_boolean setup without config. * Allow input_number setup without config. * Allow input_select setup without config. * Allow input_text setup without config. * Allow timer setup without config.
This commit is contained in:
1 parent
8af946fba5
commit
5fa7d6f22a
10 files changed
+108
-13
No files matched your search
@@ -111,7 +111,7 @@ async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool:
|
||||
collection.attach_entity_component_collection(component, storage_collection, Timer)
|
||||
|
||||
await yaml_collection.async_load(
|
||||
[{CONF_ID: id_, **cfg} for id_, cfg in config[DOMAIN].items()]
|
||||
[{CONF_ID: id_, **cfg} for id_, cfg in config.get(DOMAIN, {}).items()]
|
||||
)
|
||||
await storage_collection.async_load()
|
||||
|
||||
@@ -138,7 +138,7 @@ async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool:
|
||||
if conf is None:
|
||||
conf = {DOMAIN: {}}
|
||||
await yaml_collection.async_load(
|
||||
[{CONF_ID: id_, **cfg} for id_, cfg in conf[DOMAIN].items()]
|
||||
[{CONF_ID: id_, **cfg} for id_, cfg in conf.get(DOMAIN, {}).items()]
|
||||
)
|
||||
|
||||
homeassistant.helpers.service.async_register_admin_service(
|
||||
|
||||
Reference in new issue
Block a user