Add light group icon (#42091)

pull/42124/head
Yuval Aboulafia 2020-10-20 14:54:43 +03:00 committed by GitHub
parent be431ce12a
commit 6c3362217e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -84,6 +84,7 @@ class LightGroup(GroupEntity, light.LightEntity):
self._entity_ids = entity_ids
self._is_on = False
self._available = False
self._icon = "mdi:lightbulb-group"
self._brightness: Optional[int] = None
self._hs_color: Optional[Tuple[float, float]] = None
self._color_temp: Optional[int] = None
@ -130,6 +131,11 @@ class LightGroup(GroupEntity, light.LightEntity):
"""Return whether the light group is available."""
return self._available
@property
def icon(self):
"""Return the light group icon."""
return self._icon
@property
def brightness(self) -> Optional[int]:
"""Return the brightness of this light group between 0..255."""