I’ve set an mqtt light strip with is controlled by a Python script on a Pi Zero (using paho-mqtt and rpi-ws281x).
Everything is working fine (on/off, brightness, transitions, etc.) but the Lovelace card doesn’t seem to register the status change. When i change something (colour, brightness, status), it quickly changes back to the default status.
I found a few resources online saying that i need to send a response after having applied the changes, yet I can’t find anything on how and what to respond.
For the moment, I’ve changed to yaml config to optimistic
and everything is working just fine, but this shouldn’t be the permanent solution
My config (based on https://www.home-assistant.io/integrations/light.mqtt/):
light:
- platform: mqtt
schema: json
name: "Test RGBW Strip"
state_topic: "ido/test_rgbw_strip"
command_topic: "ido/test_rgbw_strip/set"
brightness: true
rgb: true
white_value: true
optimistic: true
qos: 1
The python side is based on the examples from
where I’ve implemented
on_message()
to handle the light strip
Many thanks for the help