Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/cast/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ async def async_step_options(self, user_input=None):
)

if not bad_cec and not bad_hosts and not bad_uuid:
updated_config = {}
updated_config = dict(current_config)
updated_config[CONF_IGNORE_CEC] = ignore_cec
updated_config[CONF_KNOWN_HOSTS] = known_hosts
updated_config[CONF_UUID] = wanted_uuid
Expand Down
8 changes: 7 additions & 1 deletion tests/components/cast/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ async def test_option_flow(hass, parameter_data):
assert result["step_id"] == "options"
data_schema = result["data_schema"].schema
assert set(data_schema) == {"known_hosts"}
orig_data = dict(config_entry.data)

# Reconfigure ignore_cec, known_hosts, uuid
context = {"source": "user", "show_advanced_options": True}
Expand Down Expand Up @@ -201,7 +202,12 @@ async def test_option_flow(hass, parameter_data):
)
assert result["type"] == data_entry_flow.RESULT_TYPE_CREATE_ENTRY
assert result["data"] is None
assert config_entry.data == {"ignore_cec": [], "known_hosts": [], "uuid": []}
assert config_entry.data == {
**orig_data,
"ignore_cec": [],
"known_hosts": [],
"uuid": [],
}


async def test_known_hosts(hass, castbrowser_mock, castbrowser_constructor_mock):
Expand Down