Event switches the light on but should not

Moderator: leecollings

Post Reply
peterg987
Posts: 2
Joined: Wednesday 26 October 2016 21:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Event switches the light on but should not

Post 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 948 times
Some ideas?

Regards
Peter
User avatar
Egregius
Posts: 2592
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Event switches the light on but should not

Post by Egregius »

I think you have if/else blocks where you should use simple if block.
peterg987
Posts: 2
Joined: Wednesday 26 October 2016 21:01
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Event switches the light on but should not

Post 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?
User avatar
StanHD
Posts: 347
Joined: Friday 12 July 2013 16:09
Target OS: Windows
Domoticz version:
Location: East Sussex, UK
Contact:

Re: Event switches the light on but should not

Post 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.
Domoticz Main - Intel nuc, Windows, RFXTRX433E. Lan Relay Boards, Aeon Z-Stick Gen 5, Evohome HGI80, Milight WiFi, MySensors Ethernet Gateway, Harmony Hub
Python:- Broadlink RM2, Sonos
HA-Bridge - Amazon Echo / Alexa
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest