i’ve configured the Sonoff ( Tasmota firmware) 4ch pro r2 to act into pulse mode changing the "PulseTime1 10 "
(for all the 4 relay)in the consolle of the sonoff, and it’s works ok, the problem come in when i connect it to the mosquitto broker of HA, every time it’s connect at the broker ( by a soft reboot of the sonoff or a reboot of the HA) all the 4 switches turn on for 1 second ,
this in my config:
By setting retain: true you have told the broker to save the message in its database and transmit it when a client (your sonoff) subscribes to the broker. This causes the sonoff to receive the message and to toggle the light.
I don’t think you need the retain behaviour, so you need to set retain: false and then remove the message from the broker’s database.
To remove the message from the broker’s database, you need to send a message to that topic with the retain flag set and a null payload.
With mosquitto_pub
mosquitto_pub -t cmnd/Allarme_sonoff/POWER1 -r -n
Or by using the mqtt.publish service with these parameters