Learning Home assistant, in pursuit to create my own MQTT controlled light, with json
schema, to minimize number of messages.
My test auto discovery message looks like:
{
"~": "ha/tm/8R-1L-1TS-123498DB/rgbstrip/04",
"name": "RGB strip 04",
"object_id": "rgbstrip_04",
"unique_id": "rgbstrip_123498DB_04",
"device_class": "light",
"schema": "json",
"cmd_t": "~/c/cmd",
"stat_t": "~/s/stat",
"optimistic": true, /* set to true for test purposes only */
"on_command_type": "first",
"brightness": true,
"white": true,
"supported_color_modes": [
"rgb","hs","xy","white","color_temp"
],
"effect": true,
"effect_list": [
"Static",
"Blink",
],
"device": {
"identifiers": [
"switch_unit_DEADBEEF"
]
}
}
Which properly generates new entity and displays controls:
They all work properly, except when I click to W
to set white color, then I get:
When I select RGB color, I properly get MQTT message similar to:
{
"state": "ON",
"color": {
"r": 81,
"g": 159,
"b": 255
}
}
What am I doing wrong that white doesn’t work?