Hi.
I need to switch on the light by movement at the specified period of time. I have created the event:
but it doesn't work at all, if I will delete one "and", all is working fine.
Please advice.
Double "and" with "if" doesn't work
Moderator: leecollings
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Double "and" with "if" doesn't work
Time > 08:00 and Time < 01:00 are mutual exclusive
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: Double "and" with "if" doesn't work
I'm not clear about the time frame in which you want le light on...
Expect it would be from 8:00am to 1:00am (so it is 8:00 ==> 24:00 and 00:00 ==> 1:00)
I would try to revert the condition:
if Burglar = on AND (Time > 8:00 OR Time < 1:00)
Expect it would be from 8:00am to 1:00am (so it is 8:00 ==> 24:00 and 00:00 ==> 1:00)
I would try to revert the condition:
if Burglar = on AND (Time > 8:00 OR Time < 1:00)
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
-
- Posts: 36
- Joined: Monday 20 November 2017 3:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Australia
- Contact:
Re: Double "and" with "if" doesn't work
Yep change the and between the times to OR. The time resets at midnight.
Re: Double "and" with "if" doesn't work
If you only change then “and”, the alarm will go off any time after 8 am. You need to swap the Burglar=On block with Time>08:00 and then change the “and” to “or” between both time statements.
-
- Posts: 36
- Joined: Monday 20 November 2017 3:24
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Australia
- Contact:
Re: Double "and" with "if" doesn't work
Really because i have this one working ok.
- Attachments
-
- Screenshot (2).png (11.11 KiB) Viewed 742 times
Re: Double "and" with "if" doesn't work
Really, it’s exact the same. You changed more than just the and to or, you rearranged some things that made it work.
Who is online
Users browsing this forum: No registered users and 1 guest