mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Fix brightness slider for mqtt template lights (#5780)
Add the missing supported_features declaration.
This commit is contained in:
parent
305d2612cf
commit
1546ec7778
@ -284,3 +284,16 @@ class MqttTemplate(Light):
|
|||||||
|
|
||||||
if self._optimistic:
|
if self._optimistic:
|
||||||
self.schedule_update_ha_state()
|
self.schedule_update_ha_state()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def supported_features(self):
|
||||||
|
"""Flag supported features."""
|
||||||
|
features = 0
|
||||||
|
if self._brightness is not None:
|
||||||
|
features = features | SUPPORT_BRIGHTNESS
|
||||||
|
if self._rgb is not None:
|
||||||
|
features = features | SUPPORT_RGB_COLOR
|
||||||
|
if self._effect_list is not None:
|
||||||
|
features = features | SUPPORT_EFFECT
|
||||||
|
|
||||||
|
return features
|
||||||
|
Loading…
x
Reference in New Issue
Block a user