Fix brightness slider for mqtt template lights (#5780)
Add the missing supported_features declaration.
This commit is contained in:
1 parent
305d2612cf
commit
1546ec7778
1 file changed
+13
@@ -284,3 +284,16 @@ class MqttTemplate(Light):
|
||||
|
||||
if self._optimistic:
|
||||
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
|
||||
Reference in new issue
Block a user