Why is the last "SET" always being triggered? Driving me nuts

Moderator: leecollings

Post Reply
Stefano1232
Posts: 6
Joined: Thursday 16 May 2019 5:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Why is the last "SET" always being triggered? Driving me nuts

Post by Stefano1232 »

Hi, Sorry for posting so much, but once I figure out the previous problem, a new one comes up.

So basically as you can see in these pictures, for some reason no matter what is in the "else if" statement, it will ALWAYS trigger the last "SET" action. It is really driving me mental, cause it makes no sense to me. Why would it do this? How do i fix this?

Image

Image

Image

(The testvar is set to 0, so this definitely should NOT run)


I'm pulling out my hair with this. Makes no sense.
User avatar
kuifje
Posts: 36
Joined: Wednesday 25 October 2017 16:38
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Heemskerk
Contact:

Re: Why is the last "SET" always being triggered? Driving me nuts

Post by kuifje »

First of all you are using the if/do and the else/if the wrong way. And second you should use a user variable to prefent the triggering.
Kuifje
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest