Retry lifx setup later if device has an unexpected serial (#98783)

This commit is contained in:
J. Nick Koston 2023-08-22 10:17:15 -05:00 committed by GitHub
parent 426fd62ee3
commit d0fc0aea40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 52 additions and 23 deletions

View file

@ -13,7 +13,6 @@ from homeassistant.util import dt as dt_util
from . import (
DEFAULT_ENTRY_TITLE,
IP_ADDRESS,
MAC_ADDRESS,
SERIAL,
MockLifxCommand,
_mocked_infrared_bulb,
@ -32,7 +31,7 @@ async def test_theme_select(hass: HomeAssistant) -> None:
domain=DOMAIN,
title=DEFAULT_ENTRY_TITLE,
data={CONF_HOST: IP_ADDRESS},
unique_id=MAC_ADDRESS,
unique_id=SERIAL,
)
config_entry.add_to_hass(hass)
bulb = _mocked_light_strip()
@ -70,7 +69,7 @@ async def test_infrared_brightness(hass: HomeAssistant) -> None:
domain=DOMAIN,
title=DEFAULT_ENTRY_TITLE,
data={CONF_HOST: IP_ADDRESS},
unique_id=MAC_ADDRESS,
unique_id=SERIAL,
)
config_entry.add_to_hass(hass)
bulb = _mocked_infrared_bulb()
@ -100,7 +99,7 @@ async def test_set_infrared_brightness_25_percent(hass: HomeAssistant) -> None:
domain=DOMAIN,
title=DEFAULT_ENTRY_TITLE,
data={CONF_HOST: IP_ADDRESS},
unique_id=MAC_ADDRESS,
unique_id=SERIAL,
)
config_entry.add_to_hass(hass)
bulb = _mocked_infrared_bulb()
@ -139,7 +138,7 @@ async def test_set_infrared_brightness_50_percent(hass: HomeAssistant) -> None:
domain=DOMAIN,
title=DEFAULT_ENTRY_TITLE,
data={CONF_HOST: IP_ADDRESS},
unique_id=MAC_ADDRESS,
unique_id=SERIAL,
)
config_entry.add_to_hass(hass)
bulb = _mocked_infrared_bulb()
@ -178,7 +177,7 @@ async def test_set_infrared_brightness_100_percent(hass: HomeAssistant) -> None:
domain=DOMAIN,
title=DEFAULT_ENTRY_TITLE,
data={CONF_HOST: IP_ADDRESS},
unique_id=MAC_ADDRESS,
unique_id=SERIAL,
)
config_entry.add_to_hass(hass)
bulb = _mocked_infrared_bulb()
@ -217,7 +216,7 @@ async def test_disable_infrared(hass: HomeAssistant) -> None:
domain=DOMAIN,
title=DEFAULT_ENTRY_TITLE,
data={CONF_HOST: IP_ADDRESS},
unique_id=MAC_ADDRESS,
unique_id=SERIAL,
)
config_entry.add_to_hass(hass)
bulb = _mocked_infrared_bulb()
@ -256,7 +255,7 @@ async def test_invalid_infrared_brightness(hass: HomeAssistant) -> None:
domain=DOMAIN,
title=DEFAULT_ENTRY_TITLE,
data={CONF_HOST: IP_ADDRESS},
unique_id=MAC_ADDRESS,
unique_id=SERIAL,
)
config_entry.add_to_hass(hass)
bulb = _mocked_infrared_bulb()