mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 01:07:10 +00:00
Huawei LTE: Fix YAML options overriding ones set from GUI (#30249)
Closes https://github.com/home-assistant/home-assistant/issues/30221
This commit is contained in:
parent
0323b246bd
commit
c5a280c064
@ -248,7 +248,9 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
|
|||||||
async def async_step_init(self, user_input=None):
|
async def async_step_init(self, user_input=None):
|
||||||
"""Handle options flow."""
|
"""Handle options flow."""
|
||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
return self.async_create_entry(title="", data=user_input)
|
# Preserve existing options, for example *_from_yaml markers
|
||||||
|
data = {**self.config_entry.options, **user_input}
|
||||||
|
return self.async_create_entry(title="", data=data)
|
||||||
|
|
||||||
data_schema = vol.Schema(
|
data_schema = vol.Schema(
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user