From 8dc05894a8c45c6a6362520e5b2e1dd0392a554a Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 4 Sep 2023 15:18:48 +0200 Subject: [PATCH] Use shorthand attributes in Nanoleaf (#99601) --- homeassistant/components/nanoleaf/light.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/homeassistant/components/nanoleaf/light.py b/homeassistant/components/nanoleaf/light.py index f0425594763..dc251ac1e5d 100644 --- a/homeassistant/components/nanoleaf/light.py +++ b/homeassistant/components/nanoleaf/light.py @@ -47,6 +47,7 @@ class NanoleafLight(NanoleafEntity, LightEntity): _attr_supported_color_modes = {ColorMode.COLOR_TEMP, ColorMode.HS} _attr_supported_features = LightEntityFeature.EFFECT | LightEntityFeature.TRANSITION _attr_name = None + _attr_icon = "mdi:triangle-outline" def __init__( self, nanoleaf: Nanoleaf, coordinator: DataUpdateCoordinator[None] @@ -83,11 +84,6 @@ class NanoleafLight(NanoleafEntity, LightEntity): """Return the list of supported effects.""" 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 def is_on(self) -> bool: """Return true if light is on."""