Device supported_features

Hi,

How can one find what are the features supported by a device ?
For example, my Meross bulb state inficated 19 features - what exactly are those ?

min_mireds: 153
max_mireds: 500
friendly_name: bedroom lamp
supported_features: 19

The only place I am aware of is to look at the source code, in this case it would be the light integration:

# Bitfield of features supported by the light entity
SUPPORT_BRIGHTNESS = 1
SUPPORT_COLOR_TEMP = 2
SUPPORT_EFFECT = 4
SUPPORT_FLASH = 8
SUPPORT_COLOR = 16
SUPPORT_TRANSITION = 32
SUPPORT_WHITE_VALUE = 128

The value is a bitfield, so 19 would be 16 + 2 + 1, which means the light supports transition, color temperature, and brightness (dimming). The meanings of the constants are explained in the developer docs.

3 Likes

This works very well indeed. Thank you.

Hello! I have been trying to get right the number for Tuya bulb that I have, it is RGB and has a White mode, but with no temperature, only brightness regulation. What combination do you suggest, please? In the app it has scene, and probably can flash. When it is inserted by the Tuya integration only supports the RGB part, with brightness regulation, but I think itā€™s possible to override, if I get the right settings. Thanks in advance!

Hi, I have the same issue with a Tuya outdoor floodlight which supports color mode and white mode. I updated to the Tuya-v2 integration, but still I can only control in color mode. When selecting the white center in the color picker, the light goes to a kind of purple-ish, but the white LEDs stay off. In the Smart Life app the device switches correctly between color mode and white mode. Any suggestions how to make this work in HA?

ā€¦
I had same issue. What I discovered was the the bulbs are slow to respond and will ignore data sent. I had to change color and brightness in three steps
1 automation triggers when detecting state change off to on
2 sent light a light turn on with no data parameters as the bulbs only will accept commands when ā€˜onā€™
3. Set a 1 second delay
4. Set color_temp using mireds value. Be sure the value you are sending is supported by bulb. See developer tools states
5. Set 2 second delay
5+set brightness in range 1 - 255
ā€¦

Same issue here. Canā€™t control white via the HA Device Settings control.

also having similar issue. have x6 geeni bulbs that are wifi (white filament, edison style)
a few updates ago everything worked great, now they will not dim in HA, just the temperature works and the on/off function.

Iā€™m not quiet sure how to select/calculate the correct ā€œsuppo.rted_featuresā€ value to re-enable the brightness function. Have tried 1, 2, 19, 51, 191ā€¦etc from what others have mentioned in the forums

UPDATE: Now I get itā€¦ adding up the numbers per the supported features.
However, the unknown part is figuring out what my bulbs really ā€œsupportā€ so I can tally up the correct value. In one of the docs I read a lot of the supported features are deprecated in place of ā€œcolor_modesā€.

You could try setting the highest value by adding up all the numbers, then the feature you want will probably be in that bitmask. If you tell HA that it supports a feature that it doesnā€™t, the worst that will happen is the UI will be wrong. I think the max value for an 8-bit bitmask (all ones, 11111111) is 255.