Selector switch detect if source is switchoff or setlevel  [Solved]

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
elgringo
Posts: 92
Joined: Thursday 18 May 2017 8:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Left
Contact:

Selector switch detect if source is switchoff or setlevel  [Solved]

Post by elgringo »

I have a dummy selector switch. With (for exmaple) 3 levels OFF(0), A(10), B(20)

Let say the selector is in B. When it is selected with OFF the level will become 0.
However when it is switched off it remains the level B, dzVents gets a trigger but the level has not changed.

When switch off, the active state remains true and the level remains unchanged. How can I detect if the the source is a set level command or a switch off command?

Edit:
I think the nValue contains what I want. This one is set to 0 when switch off and when setlevel = 0. combined with the current level I can determine it
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests