mirror of
https://github.com/elisspace/core.git
synced 2026-09-28 13:30:06 +00:00
Prevent the wrong WiZ device from being used when the IP is a different device (#67250)
This commit is contained in:
committed by
Paulus Schoutsen
parent
f39aea70e6
commit
d16f0ba32b
@@ -50,3 +50,11 @@ async def test_cleanup_on_failed_first_update(hass: HomeAssistant) -> None:
|
||||
_, entry = await async_setup_integration(hass, wizlight=bulb)
|
||||
assert entry.state == config_entries.ConfigEntryState.SETUP_RETRY
|
||||
bulb.async_close.assert_called_once()
|
||||
|
||||
|
||||
async def test_wrong_device_now_has_our_ip(hass: HomeAssistant) -> None:
|
||||
"""Test setup is retried when the wrong device is found."""
|
||||
bulb = _mocked_wizlight(None, None, FAKE_SOCKET)
|
||||
bulb.mac = "dddddddddddd"
|
||||
_, entry = await async_setup_integration(hass, wizlight=bulb)
|
||||
assert entry.state == config_entries.ConfigEntryState.SETUP_RETRY
|
||||
|
||||
Reference in New Issue
Block a user