I have a button that populate state via MQTT. I have a controller to publish and devices: switch to monitor GPIO and MQTT_import to subscribe topic.
Everything is coupled by rules and working like a charm, no issues.
BUT, if I restart ESP or update Device EE runs init which trigger rule that toggle topic value and light is going on/off.
To solve this I could do something like that:
Code: Select all
On System#Boot do
TimerSet,1,5 //set timer #1 to 5 seconds
Endon
On Rules#Timer=1 Do
Let,1,1 //set variable 1 to 1 after the 5 seconds of the timer
Endon
On Sw#State Do //on push button press
If [var#1]=1
If [var#2] < 4
Let,2,[var#2]+1
Else
Kind regards,
Wojtek