Revert SamsungTV migration (#119234)
parent
7896e7675c
commit
1e7ab07d9e
|
@ -297,16 +297,7 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry) ->
|
||||||
if version == 2:
|
if version == 2:
|
||||||
if minor_version < 2:
|
if minor_version < 2:
|
||||||
# Cleanup invalid MAC addresses - see #103512
|
# Cleanup invalid MAC addresses - see #103512
|
||||||
dev_reg = dr.async_get(hass)
|
# Reverted due to device registry collisions - see #119082 / #119249
|
||||||
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
|
|
||||||
)
|
|
||||||
|
|
||||||
minor_version = 2
|
minor_version = 2
|
||||||
hass.config_entries.async_update_entry(config_entry, minor_version=2)
|
hass.config_entries.async_update_entry(config_entry, minor_version=2)
|
||||||
|
|
|
@ -220,10 +220,14 @@ async def test_incorrectly_formatted_mac_fixed(hass: HomeAssistant) -> None:
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures("remotews", "rest_api")
|
@pytest.mark.usefixtures("remotews", "rest_api")
|
||||||
|
@pytest.mark.xfail
|
||||||
async def test_cleanup_mac(
|
async def test_cleanup_mac(
|
||||||
hass: HomeAssistant, device_registry: dr.DeviceRegistry, snapshot: SnapshotAssertion
|
hass: HomeAssistant, device_registry: dr.DeviceRegistry, snapshot: SnapshotAssertion
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test for `none` mac cleanup #103512."""
|
"""Test for `none` mac cleanup #103512.
|
||||||
|
|
||||||
|
Reverted due to device registry collisions in #119249 / #119082
|
||||||
|
"""
|
||||||
entry = MockConfigEntry(
|
entry = MockConfigEntry(
|
||||||
domain=SAMSUNGTV_DOMAIN,
|
domain=SAMSUNGTV_DOMAIN,
|
||||||
data=MOCK_ENTRY_WS_WITH_MAC,
|
data=MOCK_ENTRY_WS_WITH_MAC,
|
||||||
|
|
Loading…
Reference in New Issue