Page 1 of 1

Event switches the light on but should not

Posted: Wednesday 26 October 2016 21:37
by peterg987
Hi,

I want the dimmer increases gradually over 5 minutes to full strength.The problem with this script is that the dimmer turn on the light 100% even after 20:34. When I turn off the light eg 20:40, it lights up automatically by itself shortly after.
When I disable the script, I can turn off the light without it lights up again automatically.
event_dimmer.JPG
event_dimmer.JPG (57.74 KiB) Viewed 949 times
Some ideas?

Regards
Peter

Re: Event switches the light on but should not

Posted: Wednesday 26 October 2016 23:18
by Egregius
I think you have if/else blocks where you should use simple if block.

Re: Event switches the light on but should not

Posted: Thursday 27 October 2016 9:29
by peterg987
Egregius wrote:I think you have if/else blocks where you should use simple if block.
But it should not to affect? I'm not putting any event in ELSE.
If I have not ELSE IF statement, I can not add more IF conditions in the same event. Or can I?

Re: Event switches the light on but should not

Posted: Thursday 27 October 2016 9:57
by StanHD
I find that the use of nested "If" statements doesn't seem to work.

@Egregius is absolutely correct that an "Else If" control will not work without at least one "Else If" within that Control.

A single "Else If" Control, with multiple "Else If" statements will work OK.