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:
Alexei Chetroi authored and David F. Mulcahey committed 2020-01-14 22:15:59 -05:00
1 parent 8af946fba5
commit 5fa7d6f22a
10 files changed
+108 -13

No files matched your search

+2 -2
View File
@@ -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(