mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Fix QoS schema issue in MQTT subentries (#141531)
This commit is contained in:
parent
543c6929e6
commit
377548e3a1
@ -1267,13 +1267,9 @@ class MQTTSubentryFlowHandler(ConfigSubentryFlow):
|
||||
reconfig=True,
|
||||
)
|
||||
if user_input is not None:
|
||||
merged_user_input, errors = validate_user_input(
|
||||
user_input, MQTT_DEVICE_PLATFORM_FIELDS
|
||||
)
|
||||
_, errors = validate_user_input(user_input, MQTT_DEVICE_PLATFORM_FIELDS)
|
||||
if not errors:
|
||||
self._subentry_data[CONF_DEVICE] = cast(
|
||||
MqttDeviceData, merged_user_input
|
||||
)
|
||||
self._subentry_data[CONF_DEVICE] = cast(MqttDeviceData, user_input)
|
||||
if self.source == SOURCE_RECONFIGURE:
|
||||
return await self.async_step_summary_menu()
|
||||
return await self.async_step_entity()
|
||||
|
@ -2908,6 +2908,10 @@ async def test_subentry_configflow(
|
||||
iter(config_subentries_data["components"].values())
|
||||
)
|
||||
|
||||
subentry_device_data = next(iter(config_entry.subentries.values())).data["device"]
|
||||
for option, value in mock_device_user_input.items():
|
||||
assert subentry_device_data[option] == value
|
||||
|
||||
await hass.async_block_till_done()
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user