mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-14 15:54:04 +02:00
abort if already setup
This commit is contained in:
parent
e9ee147e20
commit
28389ebebe
1 changed files with 2 additions and 0 deletions
|
|
@ -44,6 +44,8 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
_DOMAIN_SCHEMA = get_domain_schema(yaml=False)
|
||||
schema = {k: v for k, v in _DOMAIN_SCHEMA.items() if k in user_input}
|
||||
vol.Schema(schema)(user_input)
|
||||
await self.async_set_unique_id(user_input["name"])
|
||||
self._abort_if_unique_id_configured()
|
||||
return self.async_create_entry(title=user_input["name"], data=user_input)
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue