Conditional not evaluated
Posted: Sunday 23 February 2020 20:46
Hello
I have this blocky script The logic is
In plain text: if a movement sensor is on and it's dark, then turn vestibulo light on and if time is after sunset then turn light pasillo on too.
The problem is:
is evaluate always to TRUE, so it always set vestibulo and pasillo to on when the movement sensor is on and light is under 20.
I can not understand why this logic doesn´t work
Any idea?
I have this blocky script The logic is
Code: Select all
If (vest-mov== on and vest-lux <20)
{
set vestibulo = on
if (time > sunset and pasillo == off )
set pasillo = off
}
else
if (vest-mov== off and vestibulo == on)
set vestibulo = off
The problem is:
Code: Select all
if (time > sunset and pasillo == off )
set pasillo = off
I can not understand why this logic doesn´t work
Any idea?