From c5a280c064220ce5ef9135700dc0fcbd384ec04c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 28 Dec 2019 17:27:49 +0200 Subject: [PATCH] Huawei LTE: Fix YAML options overriding ones set from GUI (#30249) Closes https://github.com/home-assistant/home-assistant/issues/30221 --- homeassistant/components/huawei_lte/config_flow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/huawei_lte/config_flow.py b/homeassistant/components/huawei_lte/config_flow.py index 64803d4ad45..0dcdb6636c6 100644 --- a/homeassistant/components/huawei_lte/config_flow.py +++ b/homeassistant/components/huawei_lte/config_flow.py @@ -248,7 +248,9 @@ class OptionsFlowHandler(config_entries.OptionsFlow): async def async_step_init(self, user_input=None): """Handle options flow.""" 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( {