@@ -168,8 +168,10 @@ async def set_config_subentry(
168168
169169 The reconfigure branch fails when the flow leaves any supplied config key
170170 unconsumed, where it previously returned success plus a warning — see
171- :func:`_handle_config_subentry_flow_steps` for why. The create branch is
172- unchanged.
171+ :func:`_handle_config_subentry_flow_steps` for why. It also walks with
172+ ``keep_current_values`` (issue #2254), so a partial patch keeps the
173+ subentry fields it does not name instead of resetting them. The create
174+ branch is unchanged on both counts.
173175 """
174176 _reject_redaction_sentinels (config_dict )
175177 flow_result = await client .start_config_subentry_flow (
@@ -205,6 +207,7 @@ async def set_config_subentry(
205207 flow_result ,
206208 config_dict ,
207209 is_reconfigure = subentry_id is not None ,
210+ keep_current_values = subentry_id is not None ,
208211 )
209212 except asyncio .CancelledError :
210213 await _abort_subentry_flow_best_effort (client , flow_id )
@@ -289,6 +292,17 @@ async def update_config_entry_options(
289292 ``ha_set_integration`` path passes ``None`` to accept any domain). Starts
290293 an options flow, walks the flow steps, and returns the result. Aborts the
291294 flow on error. ``noun`` only affects response wording.
295+
296+ This edits an existing entry, so the walk runs with
297+ ``keep_current_values``: every field an options step declares that
298+ ``config_dict`` does not name is submitted with the value the step itself
299+ carries, exactly as the HA UI's "Configure" dialog posts back the boxes
300+ nobody touched. Before issue #2254 those keys were dropped and voluptuous
301+ substituted each field's static default, so a one-key patch silently reset
302+ the rest of the entry's options. A key the caller sets to ``None`` is the
303+ opposite request and is honoured as a clear, which for a field carrying a
304+ schema default means submitting the ``None`` for Home Assistant to
305+ validate rather than omitting it into that default.
292306 """
293307 _reject_redaction_sentinels (config_dict )
294308 config_entry = await client .get_config_entry (entry_id )
@@ -332,6 +346,7 @@ async def update_config_entry_options(
332346 config_dict ,
333347 submit_fn = client .submit_options_flow_step ,
334348 helper_type = expected_domain ,
349+ keep_current_values = True ,
335350 )
336351 except Exception :
337352 try :
0 commit comments