IF multistate-device change to value?

Moderator: leecollings

Post Reply
Evelen
Posts: 234
Joined: Thursday 09 July 2015 12:03
Target OS: Linux
Domoticz version: 2.4538
Location: Norway
Contact:

IF multistate-device change to value?

Post by Evelen »

Hi.
I have this multistate device for changing state on my mobile phone:
Uten navn.png
Uten navn.png (30.5 KiB) Viewed 572 times
I want to do this:

If multistate device CHANGES TO (from other state) "Lader ikke" and if som other devices is off
do: dim 3 lights to 10%

how can i do this?
I only want it to trigger if the multistate device changes to "lader ikke", not if it IS "lader ikke" and some of the other switches change status.
pj-r
Posts: 140
Joined: Wednesday 17 December 2014 17:30
Target OS: Linux
Domoticz version: V3.8650
Location: Jyväskylä, Finland
Contact:

Re: IF multistate-device change to value?

Post by pj-r »

Store the changed status to some user variable for example and compare also to that 8-)

pseudo code:

Code: Select all

if yourswitch.status = wantedstatus and yourswitch.status <> laststatus then 
 do the stuff... set dimmer.
end if
set laststatus = yourswitch.status
LXC(x64 Ubuntu Xenial), RFXtrx433E, MySensors
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest