mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Move options to SelectEntityDescription in lifx (#80015)
This commit is contained in:
parent
ce4d93b0c1
commit
4281384d2a
@ -16,10 +16,9 @@ INFRARED_BRIGHTNESS_ENTITY = SelectEntityDescription(
|
|||||||
key=INFRARED_BRIGHTNESS,
|
key=INFRARED_BRIGHTNESS,
|
||||||
name="Infrared brightness",
|
name="Infrared brightness",
|
||||||
entity_category=EntityCategory.CONFIG,
|
entity_category=EntityCategory.CONFIG,
|
||||||
|
options=list(INFRARED_BRIGHTNESS_VALUES_MAP.values()),
|
||||||
)
|
)
|
||||||
|
|
||||||
INFRARED_BRIGHTNESS_OPTIONS = list(INFRARED_BRIGHTNESS_VALUES_MAP.values())
|
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||||
@ -41,7 +40,6 @@ class LIFXInfraredBrightnessSelectEntity(LIFXEntity, SelectEntity):
|
|||||||
"""LIFX Nightvision infrared brightness configuration entity."""
|
"""LIFX Nightvision infrared brightness configuration entity."""
|
||||||
|
|
||||||
_attr_has_entity_name = True
|
_attr_has_entity_name = True
|
||||||
_attr_options = INFRARED_BRIGHTNESS_OPTIONS
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, coordinator: LIFXUpdateCoordinator, description: SelectEntityDescription
|
self, coordinator: LIFXUpdateCoordinator, description: SelectEntityDescription
|
||||||
|
Loading…
x
Reference in New Issue
Block a user