I have now about 4 scenes to controll my gate, garage and lights when I come home and leave. Works fine , but maybe I can put it all in PLEG en declutter my scenes.
What I have now:
1 main scene which I activate when I come home or leave. This scenes activates 2 other scenes ( 2&3) and have some LUUP code that this scene cannot be activated again within 60 seconds.
scene2: activate gate , activate garage door. After 90 seconds activate gate again ( = close gate).
scene3: check if the night& day plugin is in night mode; if yes , switch on some lights , and with different delays , switch them off.
How to insert this all in PLEG.
before I start fiddling arround in PLEG I want to have a basic idea what I am doing, I was thinking like this:
Input trigger:
-virtual switch >> when switch is on (name: come_and_leave)
-Day night plugin >> when indicating night (name: day_night)
conditions:
-open_gate >> come_and_leave
-gate_lights >> come_and_leave AND day_night
actions:
-open_gate >>fibaro gate , fibaro garage >>delay 90 seconds , fibaro gate and the virtual switch which starts the sequence back to off position.
-gate_lights >> switch on some lights >> some delays , switch them off
But how do I insert the code that when the virtual switch is presses it cannot be pressed again within 60 seconds.
Does this PLEG makes sense?
Thanks,
Cor