I have the rule below working fine,however I want to be able to disable both rules when needed by setting an IO pin high from openhab.
I can successfully toggle IO12 from openhab,I can see this in tools > pin state buffer,how do I read this pin state in rules to disable them when IO12 is high ?
Have tried setting up a switch under device tab using IO12 but it does not change state.
Code: Select all
on Pir_Sensor#Pir=1 do
if [LDR#Analog]>1000 AND [Saturday#Inhibit]=0
Publish RGB/0017F169/color/set,200,200,200
Publish RGB/0017F169/brightness/set,200
endif
endon
on Pir_Sensor#Pir=0 do
if [LDR#Analog]>1000 AND [Saturday#Inhibit]=0
Publish RGB/0017F169/state/set,OFF
endif
endon