Introduced abort in config flow if all entities are deselected when editing a device
This commit is contained in:
@@ -570,6 +570,11 @@ class LocalTuyaOptionsFlowHandler(config_entries.OptionsFlow):
|
||||
CONF_ENTITIES: [],
|
||||
}
|
||||
)
|
||||
if len(user_input[CONF_ENTITIES]) == 0:
|
||||
return self.async_abort(
|
||||
reason="no_entities",
|
||||
description_placeholders={},
|
||||
)
|
||||
if user_input[CONF_ENTITIES]:
|
||||
entity_ids = [
|
||||
int(entity.split(":")[0])
|
||||
|
Reference in New Issue
Block a user