Revert SamsungTV migration (#119234)

pull/119376/head
epenet 2024-06-10 20:20:25 +02:00 committed by Franck Nijhof
parent 7896e7675c
commit 1e7ab07d9e
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
2 changed files with 6 additions and 11 deletions

View File

@ -297,16 +297,7 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
if version == 2:
if minor_version < 2:
# Cleanup invalid MAC addresses - see #103512
dev_reg = dr.async_get(hass)
for device in dr.async_entries_for_config_entry(
dev_reg, config_entry.entry_id
):
new_connections = device.connections.copy()
new_connections.discard((dr.CONNECTION_NETWORK_MAC, "none"))
if new_connections != device.connections:
dev_reg.async_update_device(
device.id, new_connections=new_connections
)
# Reverted due to device registry collisions - see #119082 / #119249
minor_version = 2
hass.config_entries.async_update_entry(config_entry, minor_version=2)

View File

@ -220,10 +220,14 @@ async def test_incorrectly_formatted_mac_fixed(hass: HomeAssistant) -> None:
@pytest.mark.usefixtures("remotews", "rest_api")
@pytest.mark.xfail
async def test_cleanup_mac(
hass: HomeAssistant, device_registry: dr.DeviceRegistry, snapshot: SnapshotAssertion
) -> None:
"""Test for `none` mac cleanup #103512."""
"""Test for `none` mac cleanup #103512.
Reverted due to device registry collisions in #119249 / #119082
"""
entry = MockConfigEntry(
domain=SAMSUNGTV_DOMAIN,
data=MOCK_ENTRY_WS_WITH_MAC,