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

@@ -105,7 +105,7 @@ async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool:
)
await yaml_collection.async_load(
[{CONF_ID: id_, **(conf or {})} for id_, conf in config[DOMAIN].items()]
[{CONF_ID: id_, **(conf or {})} for id_, conf in config.get(DOMAIN, {}).items()]
)
await storage_collection.async_load()
@@ -132,7 +132,10 @@ async def async_setup(hass: HomeAssistantType, config: ConfigType) -> bool:
if conf is None:
return
await yaml_collection.async_load(
[{CONF_ID: id_, **(conf or {})} for id_, conf in conf[DOMAIN].items()]
[
{CONF_ID: id_, **(conf or {})}
for id_, conf in conf.get(DOMAIN, {}).items()
]
)
homeassistant.helpers.service.async_register_admin_service(