I have a Tasmotised Magic Home RGBW (without IR) and like others I have not managed to set up control of the white channel.
The device can be commanded to control the first three channels RGB and also will respond to DIMMER messages.
Using the console to investigate the behaviour I can successfully control all 4 channels via direct input of the COLOR values. Here are some examples:
01:43:09 CMD: cmnd/sausage/color 336699cc
01:43:09 MQT: stat/sausage/RESULT = {"POWER":"ON","Dimmer":80,"Color":"326598CC","HSBColor":"210,67,60","Channel":[20,40,60,80]}
01:43:42 CMD: cmnd/sausage/color ffffffff
01:43:42 MQT: stat/sausage/RESULT = {"POWER":"ON","Dimmer":100,"Color":"FFFFFFFF","HSBColor":"0,0,100","Channel":[100,100,100,100]}
01:43:54 CMD: cmnd/sausage/color 33333333
01:43:54 MQT: stat/sausage/RESULT = {"POWER":"ON","Dimmer":20,"Color":"33333333","HSBColor":"0,0,20","Channel":[20,20,20,20]}
As can be seen I have direct control over the RGB and W channels - including the brightness of each channel (it automagically adjusts the Dimmer value to suit the overall brightness being assigned to RGB and W - so I don’t think I really need to worry about sending DIMMER commands)
What I am failing to create is a controller in HA that can handle RGB AND W - and I it is driving me nuts!
Here is my current setup for this light - but only the RGB and Dimmer settings actually work!
- platform: mqtt
name: "Sausage"
state_topic: "stat/sausage/POWER"
command_topic: "cmnd/sausage/POWER"
state_value_template: "{{ value_json.POWER }}"
rgb_state_topic: "stat/sausage/Color"
rgb_command_topic: "cmnd/sausage/Color"
rgb_command_template: "{{ '%02x%02x%02x' | format(red, green, blue)}}"
rgb_value_template: "{{ value_json.Color }}"
# this next bit does not work!!
# white_state_topic: "stat/sausage/Color"
# white_command_topic: "cmnd/sausage/Color"
# white_command_template: "{{ '000000%02x' | format(white)}}"
# white_value_template: "{{ '000000%02x' | format(white) }}"
brightness_state_topic: "stat/sausage/DIMMER"
brightness_command_topic: "cmnd/sausage/DIMMER"
brightness_scale: 100
brightness_value_template: "{{ value_json.Dimmer }}"
effect_state_topic: "stat/sausage/SCHEME"
effect_command_topic: "cmnd/sausage/Scheme"
effect_value_template: "{{ value_json.Scheme }}"
effect_list:
- 0
- 1
- 2
- 3
- 4
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
payload_on: "ON"
payload_off: "OFF"
optimistic: false
retain: true