When I run the script directly from the UI the entire sequence is executed.
When I use the sensor, I can see in the homeassistan.log that the script is executed, but the mqtt messages are not send !?!?
I have changed the action as you suggested.
Now when the sensor triggers, I can see in the homeassisant.log that the script is executed:
‘Running script’ - and 4 times ‘Executing step call service’. In one of the steps the mqtt message is send:
[homeassistant.components.mqtt] Transmitting message on /MyTopic/Action002: {“state”:“ON”}
The thing is that the two messages are not received by my iot device and the timer is not started.
Now, when I start the script directly from the UI, All messages are received and I see additional lines in the log: