core: MQTT light - Color wheel not working with auto discovered Tasmota

The problem

The color wheel in any Tasmota light does not change the color and sets the bulb to white. Clicking the color briefly changes the LEDs to the preferred color but immediately goes back to white. An example of what happens in the UI can be found in a video by a user here:

Note: In this issue, Tasmota is using the MQTT integration’s light with basic schema. Setting an rgbw color will be translated to a color command followed by a white command. Tasmota will turn off the colors when processing the white command.

https://www.reddit.com/r/homeassistant/comments/n7upv2/home_assistant_tasmota_lights_not_working/

The Tasmota web interface for a bulb works as expected (HA issue).

Tasmota via MQTT.

What is version of Home Assistant Core has the issue?

core-2021.5.1

What was the last working version of Home Assistant Core?

2021.4.6

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Tasmota via MQTT

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tasmota/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Possibly:

Logger: homeassistant.components.mqtt
Source: components/mqtt/__init__.py:888
Integration: MQTT (documentation, issues)
First occurred: 11:00:47 AM (1 occurrences)
Last logged: 11:00:47 AM

Can't decode payload b'{"name":"Bookshelf status","stat_t":"bookshelf/tele/HASS_STATE","avty_t":"bookshelf/tele/LWT","pl_avail":"Online",0\xf1\x02\x00\x15bookshelf/stat/STATUS{"Status":{"Module":0,"DeviceName":"Bookshelf","FriendlyName":["Bookshelf"],"Topic":"bookshelf","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"Butt' on homeassistant/sensor/681DBC_status/config with encoding utf-8 (for <Job HassJobType.Coroutinefunction <function async_start.<locals>.async_discovery_message_received at 0x7f1663a47040>>)

Additional information

https://www.reddit.com/r/homeassistant/comments/n7upv2/home_assistant_tasmota_lights_not_working/

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 3
  • Comments: 20 (9 by maintainers)

Most upvoted comments

The old way worked. The current way has broken all my (and many other) lights and seems it was released without testing. Any chance of rolling back this change until the corresponding changes are made (and tested) in Tasmota?

Agreed that the new color picker does not work well with Tasmota in its default configuration.

There are multiple viable workarounds for Tasmota:

  • Use the native Tasmota integration
  • SetOption37=128 - This will expose two lights, one RGB and one white, to Home Assistant
  • Enable white blend mode by setting SetOption105 1, this will expose the RGBW light as an RGB light, and Tasmota will automatically control the white channel.

For the default configuration, this is the way forward: https://github.com/home-assistant/core/pull/51411, the PR introduces a “white” color_mode which will work well with Tasmota’s default configuration (color or white, not both).

The problem with the old way was the “white_value” light feature which was poorly documented and thus behaved differently for different lights. It’s been replaced by an “RGBW” color mode.

What was wrong with the way it used to work?

The problem is understood, the workaround is to split the light in two as explained here: https://github.com/home-assistant/core/issues/50316#issuecomment-835736730, or to use the Tasmota integration for RGBW lights instead of MQTT, that behaves better.

A proper correction will require changes in both Tasmota and Home Assistant. Initial Tasmota patches are merged, but Home Assistant patches (#50464, #50530) are currently under review. The final change will be to update the Tasmota MQTT discovery to use the new feature.

I also have it. No Tasmota integration, only auto MQTT.

Can confirm several folks I know have the same issue of it sending the color2, then white 0 right after.

@emontnemery. Thanks for the speedy reply.

The current implementation of the native integration will set the light to white if the white value is greater than 0, and to color otherwise.

That makes sense.

please open a new issue about it, and let’s continue the discussion there.

Will do.

The best option for now is to do SetOption37=128, that will expose the RGB channels as an RGB light and the white channel as a monochrome light which can work independently. Could you give that a try?

Did this. SO37 128 created the second switch and I could switch between them and control the light without issue.

However, as a user, I found having to switch between two lights non-intuitive. I find it easier to revert back to SO37 0 and then manually reduce the white brightness to 0 when I want to use the colour wheel.

I agree the user experience is not great though, but I’m not sure how to improve it, suggestions are welcome.

I am no programmer, but would it be possible to do the following in the UI:

  • if user clicks in the centre of wheel (white section) - turns white light on and uses white brightness to control dimmer
  • if user clicks anywhere else on wheel (ie on the colours) and the white light gets set to 0 and RGB turns on?

Happy to test anything to help out.

I am using the new native Tasmota integration and am experiencing this issue.

Wheel stops working whenever white value (in RGBW) is greater than 0.

If I issue "color xxx,xxx,xxx,0 "command in tasmota console then wheel will continue to work until colour value for W is anything other than 0.