mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Use shorthand attributes in Nanoleaf (#99601)
This commit is contained in:
parent
f1bb7c25db
commit
8dc05894a8
@ -47,6 +47,7 @@ class NanoleafLight(NanoleafEntity, LightEntity):
|
|||||||
_attr_supported_color_modes = {ColorMode.COLOR_TEMP, ColorMode.HS}
|
_attr_supported_color_modes = {ColorMode.COLOR_TEMP, ColorMode.HS}
|
||||||
_attr_supported_features = LightEntityFeature.EFFECT | LightEntityFeature.TRANSITION
|
_attr_supported_features = LightEntityFeature.EFFECT | LightEntityFeature.TRANSITION
|
||||||
_attr_name = None
|
_attr_name = None
|
||||||
|
_attr_icon = "mdi:triangle-outline"
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, nanoleaf: Nanoleaf, coordinator: DataUpdateCoordinator[None]
|
self, nanoleaf: Nanoleaf, coordinator: DataUpdateCoordinator[None]
|
||||||
@ -83,11 +84,6 @@ class NanoleafLight(NanoleafEntity, LightEntity):
|
|||||||
"""Return the list of supported effects."""
|
"""Return the list of supported effects."""
|
||||||
return self._nanoleaf.effects_list
|
return self._nanoleaf.effects_list
|
||||||
|
|
||||||
@property
|
|
||||||
def icon(self) -> str:
|
|
||||||
"""Return the icon to use in the frontend, if any."""
|
|
||||||
return "mdi:triangle-outline"
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self) -> bool:
|
def is_on(self) -> bool:
|
||||||
"""Return true if light is on."""
|
"""Return true if light is on."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user