Migrate evil genius labs to has entity name (#96570)

This commit is contained in:
Joost Lekkerkerker 2023-07-16 03:03:47 +02:00 committed by GitHub
parent b53df429fa
commit 63115a906d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -32,6 +32,7 @@ async def async_setup_entry(
class EvilGeniusLight(EvilGeniusEntity, LightEntity):
"""Evil Genius Labs light."""
_attr_name = None
_attr_supported_features = LightEntityFeature.EFFECT
_attr_supported_color_modes = {ColorMode.RGB}
_attr_color_mode = ColorMode.RGB
@ -47,11 +48,6 @@ class EvilGeniusLight(EvilGeniusEntity, LightEntity):
]
self._attr_effect_list.insert(0, HA_NO_EFFECT)
@property
def name(self) -> str:
"""Return name."""
return cast(str, self.coordinator.data["name"]["value"])
@property
def is_on(self) -> bool:
"""Return if light is on."""