mirror of
https://github.com/basnijholt/adaptive-lighting.git
synced 2026-09-12 14:54:04 +02:00
update yaml settings
This commit is contained in:
parent
d198528029
commit
6bb5e4229d
1 changed files with 6 additions and 1 deletions
|
|
@ -43,7 +43,12 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
async def async_step_import(self, user_input=None):
|
||||
"""Handle configuration by yaml file."""
|
||||
await self.async_set_unique_id(user_input["name"])
|
||||
self._abort_if_unique_id_configured()
|
||||
for entry in self._async_current_entries():
|
||||
if entry.unique_id == self.unique_id:
|
||||
self.hass.config_entries.async_update_entry(
|
||||
entry, data=dict(entry.data, **user_input)
|
||||
)
|
||||
return
|
||||
return self.async_create_entry(title=user_input["name"], data=user_input)
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue