linting, sub string for constant

This commit is contained in:
danaues 2022-10-29 23:58:03 +00:00
commit c24ac4e615

View file

@ -98,8 +98,12 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
]
for configured_light in data[CONF_LIGHTS]:
if configured_light not in all_lights:
errors = {"lights":"entity_missing"}
_LOGGER.error("%s: light entity %s is configured, but was not found", data[CONF_NAME], configured_light)
errors = {CONF_LIGHTS: "entity_missing"}
_LOGGER.error(
"%s: light entity %s is configured, but was not found",
data[CONF_NAME],
configured_light,
)
all_lights.append(configured_light)
to_replace = {CONF_LIGHTS: cv.multi_select(sorted(all_lights))}