Hi, I have the following issue. In the blocky shown in the attachment I have 2 conditions. Kodi = ON and Donker = ON. So now when either of those 2 switches are changing to "ON" the event is triggered. But that's actually not what I want. What I want is that the event only is triggered when the Kodi switch changes to "ON", but only under the condition that the switch Donker is also "ON".
Is this possible with blocky events, or am I going to need a script for this?
Blocky triggers with condition
Moderator: leecollings
-
- Posts: 81
- Joined: Thursday 10 December 2015 0:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Netherlands
- Contact:
Blocky triggers with condition
- Attachments
-
- Knipsel.PNG (9.74 KiB) Viewed 1493 times
-
- Posts: 7
- Joined: Sunday 29 November 2015 15:31
- Target OS: Linux
- Domoticz version: beta
- Contact:
Re: Blocky triggers with condition
You have to delete the first "and" condition, so you only have the condition "kodi = On and Donker = On".
-
- Posts: 81
- Joined: Thursday 10 December 2015 0:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Netherlands
- Contact:
Re: Blocky triggers with condition
No that has nothing to do with it. That first "and" statement wasn't even there, I just added it add an extra switch as a workarround for my problem. I just left it out the screenshot. The problem is that the event will always be triggered when one of the switches changes, but I only want it to be triggered when Kodi changes his value. The donker switch has to be a condition.
-
- Posts: 81
- Joined: Thursday 10 December 2015 0:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.4834
- Location: Netherlands
- Contact:
Re: Blocky triggers with condition
This is the complete screenshot. I added the iPhone 6 switch (which means that I am at home) as a workarround.
- Attachments
-
- Knipsel.PNG (13.46 KiB) Viewed 1459 times
-
- Posts: 135
- Joined: Friday 02 January 2015 9:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands
- Contact:
Re: Blocky triggers with condition
I think this does what you want:
Add variables called something like 'kodi_daylight' and 'kodi_dark' (this last one is nog even necessary) which you set something like this:
or shorter:
Add variables called something like 'kodi_daylight' and 'kodi_dark' (this last one is nog even necessary) which you set something like this:
Code: Select all
If [Kodi = Off] and [[var kodi_dark = 1] or [var kodi_daylight = 1]]
Do [Set var kodi_daylight = 0]
[Set var kodi_dark = 0]
Else if [Kodi = On] and [Donker = Off] and [var kodi_daylight = 0]
Do [Set var kodi_daylight = 1]
Else if [Kodi = On] and [Donker = On] and [var kodi_dark = 0]
Do [Set var kodi_dark = 1]
Else if [Kodi = On] and [Donker = On] and [var kodi_dark = 1] and [var kodi_daylight = 0] and [Woonkamer normale verlichting = Off]
Do [Set Woonkamer normale verlichting = On]
Code: Select all
If [Kodi = Off] and [var kodi_daylight = 1]
Do [Set var kodi_daylight = 0]
Else if [Kodi = On] and [Donker = Off] and [var kodi_daylight = 0]
Do [Set var kodi_daylight = 1]
Else if [Kodi = On] and [Donker = On] and [var kodi_daylight = 0] and [Woonkamer normale verlichting = Off]
Do [Set Woonkamer normale verlichting = On]
Who is online
Users browsing this forum: No registered users and 1 guest