I have light I controll with MQTT.
I don’t get any state back so I need to send commands blind.
This is not really a problem.
To turn off light I basically set 0 with some parameter as payload_off
However there are certain conditions when the light will not turn off when sending 0 directly but I actually needs to send a higher value first and then 0.
So my idea was if I could setup so payload_off would first set commands to set light to 1 and then send a second payload to set the light to 0.
Here are my setup for on/off now which works but not under certain conditions.
If I cannot send two payloads I can solve it with automation.
However it would be nice not to be able to make a generic automation for all lights instead of making one that works for all.
For my MQTT device I now have set payload_off: '{"scene": 12, "level": 1, "duration": 50}'
I have managed to solve an automations that triggers no matter which light I turn off by listening to MQTT topic.
Can I use the payload from the trigger as part of the action?
Basically take the payload that trigger: "{\"scene\": 12, \"level\": 1, \"duration\": 2}"
and change to: "{\"scene\": 12, \"level\": 0, \"duration\": 2}"