Page 1 of 1
How do i stop this from looping forever?
Posted: Friday 17 May 2019 6:40
by Stefano1232
Hi, I have a script which should turn the light on, when the wall remote button is pressed. I had to do this weird work around as you can see to get it to to work. Ok so when I do one if statement at a time (Only have the turn light on command) It works, but putting both the if and else if statement to turn the light on and off with the same button, causing the light to forever try to turn off and on at the same time.
How do I fix this?
image hosting
Re: How do i stop this from looping forever?
Posted: Friday 17 May 2019 16:39
by knielen
I'm not sure, but maybe it works if you set the WallSwitch1 to Off in your actions.
Re: How do i stop this from looping forever?
Posted: Friday 17 May 2019 19:41
by Stefano1232
knielen wrote: ↑Friday 17 May 2019 16:39
I'm not sure, but maybe it works if you set the WallSwitch1 to Off in your actions.
I tried this, but it stops the action of the light. For example: I press button when light is on, it starts to turn light off (Light starts to dim) then stops (Light is still on) then press again, and it starts to go back to the brighter dim settings, then stops.
Is there a way to check if light has reached the desired state before turning the button off?
Re: How do i stop this from looping forever?
Posted: Saturday 18 May 2019 7:32
by kuifje
IT turns on and of because you are using the same triggers at the same time.
When you push the remote button does iT stay on or is this a 1 time only?
Kuifje