Page 1 of 1

Variable only changes once

Posted: Saturday 05 February 2022 23:18
by blackeagle
Hi All,

I have created a blockly where if one of us is at home after sunset, the living room lights turn on.
Also added a variable to be able to turn off the light.
blockly.png
blockly.png (62.12 KiB) Viewed 969 times
When I start the variable with OFF, it does switch to ON.
But when the mobile phones disconnect (simulating leaving home) it does not go to the OFF state.
Variable.png
Variable.png (17.92 KiB) Viewed 969 times
Am I missing something in the blocks?

Re: Variable only changes once

Posted: Sunday 06 February 2022 12:58
by madpatrick
Try remove the "iemand_thuis" = On on the ElseIf line
Basicly it doesn't matter which status this is having

Re: Variable only changes once

Posted: Sunday 06 February 2022 22:19
by blackeagle
The same result, when putting the variable manually to OFF, it switches once, then not anymore.

Re: Variable only changes once

Posted: Friday 11 February 2022 9:02
by BennY
Hi,

try it with the Green Label instead of the state On/Off.

At Logic, the Last Label with "()".

Benny