grovkillen wrote: ↑19 Oct 2018, 17:51
I would use a dummy value that is set to zero during activation of the scenario, once the scenario is complete you set the dummy value to one.
If someone press the wall button when the scenario is rolling you have a check of the dummy value and if the value is zero your code will not proceed.
ok got it, thanks
just another help on write rules
now mine rules is:
Code: Select all
on event_UP_SHORT_blind_test do
if [relayp#R_UP]>0
output,relayp,0,0
else
output,relayp,1,0
output,relayp,0,1
timerset,1,2 // to trigger relay UP direction for 2seconds
SendToHTTP 192.168.0.105,8085,/json.htm?type=command¶m=updateuservariable&vname=blindControl&vtype=2&vvalue={"n":"blind_test","d":"UP","s":"2"}
endif
endon
now i have added a dummy device:
- Immagine.jpg (35.09 KiB) Viewed 1698 times
now i want to use the wall switch only if the dummy device "blind1_lock" is = to 0 if "blind1_lock" = 1 i do not want to allow wall switch is correct this rule modify?
Code: Select all
on event_UP_SHORT_blind_test do
if [relayp#R_UP]>0 and [blind_lock#blind1_lock]=0
output,relayp,0,0
else
output,relayp,1,0
output,relayp,0,1
timerset,1,2 // to trigger relay UP direction for 2seconds
SendToHTTP 192.168.0.105,8085,/json.htm?type=command¶m=updateuservariable&vname=blindControl&vtype=2&vvalue={"n":"blind_test","d":"UP","s":"2"}
endif
endon