|
|
@@ -97,9 +97,9 @@ class ConfigFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|
|
config = get_config(self.data[CONF_TYPE])
|
|
|
schema = {vol.Required(CONF_NAME, default=config.name): str}
|
|
|
e = config.primary_entity
|
|
|
- schema[vol.Optional(e.entity, default=True)] = bool
|
|
|
+ schema[vol.Optional(e.config_id, default=True)] = bool
|
|
|
for e in config.secondary_entities():
|
|
|
- schema[vol.Optional(e.entity, default=not e.deprecated)] = bool
|
|
|
+ schema[vol.Optional(e.config_id, default=not e.deprecated)] = bool
|
|
|
|
|
|
return self.async_show_form(
|
|
|
step_id="choose_entities",
|
|
|
@@ -141,9 +141,11 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
|
|
|
if cfg is None:
|
|
|
return self.async_abort(reason="not_supported")
|
|
|
e = cfg.primary_entity
|
|
|
- schema[vol.Optional(e.entity, default=config.get(e.entity, True))] = bool
|
|
|
+ schema[vol.Optional(e.config_id, default=config.get(e.config_id, True))] = bool
|
|
|
for e in cfg.secondary_entities():
|
|
|
- schema[vol.Optional(e.entity, default=config.get(e.entity, False))] = bool
|
|
|
+ schema[
|
|
|
+ vol.Optional(e.config_id, default=config.get(e.config_id, False))
|
|
|
+ ] = bool
|
|
|
return self.async_show_form(
|
|
|
step_id="user",
|
|
|
data_schema=vol.Schema(schema),
|