mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Small lifx fixes (#80828)
This commit is contained in:
parent
5fbf6ce8bd
commit
0f50b2edd3
@ -41,21 +41,22 @@ async def async_setup_entry(
|
|||||||
) -> None:
|
) -> None:
|
||||||
"""Set up LIFX from a config entry."""
|
"""Set up LIFX from a config entry."""
|
||||||
coordinator: LIFXUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
|
coordinator: LIFXUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
|
||||||
|
entities: list[LIFXEntity] = []
|
||||||
|
|
||||||
if lifx_features(coordinator.device)["infrared"]:
|
if lifx_features(coordinator.device)["infrared"]:
|
||||||
async_add_entities(
|
entities.append(
|
||||||
[
|
LIFXInfraredBrightnessSelectEntity(
|
||||||
LIFXInfraredBrightnessSelectEntity(
|
coordinator=coordinator, description=INFRARED_BRIGHTNESS_ENTITY
|
||||||
coordinator=coordinator, description=INFRARED_BRIGHTNESS_ENTITY
|
)
|
||||||
)
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if lifx_features(coordinator.device)["multizone"] is True:
|
if lifx_features(coordinator.device)["multizone"] is True:
|
||||||
async_add_entities(
|
entities.append(
|
||||||
[LIFXThemeSelectEntity(coordinator=coordinator, description=THEME_ENTITY)]
|
LIFXThemeSelectEntity(coordinator=coordinator, description=THEME_ENTITY)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
async_add_entities(entities)
|
||||||
|
|
||||||
|
|
||||||
class LIFXInfraredBrightnessSelectEntity(LIFXEntity, SelectEntity):
|
class LIFXInfraredBrightnessSelectEntity(LIFXEntity, SelectEntity):
|
||||||
"""LIFX Nightvision infrared brightness configuration entity."""
|
"""LIFX Nightvision infrared brightness configuration entity."""
|
||||||
|
@ -154,8 +154,6 @@ async def async_execute_lifx(method: Callable) -> Message:
|
|||||||
# us by async_timeout when we hit the OVERALL_TIMEOUT
|
# us by async_timeout when we hit the OVERALL_TIMEOUT
|
||||||
future.set_result(message)
|
future.set_result(message)
|
||||||
|
|
||||||
# _LOGGER.debug("Sending LIFX command: %s", method)
|
|
||||||
|
|
||||||
method(callb=_callback)
|
method(callb=_callback)
|
||||||
result = None
|
result = None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user