triggering device after another is ON between time  [Solved]

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

Moderator: leecollings

Post Reply
Adso76
Posts: 20
Joined: Tuesday 28 August 2018 21:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

triggering device after another is ON between time

Post by Adso76 »

Hi,

How to turn on the device after another one has just been turned on but only at certain time. Whats wrong with the following statement:

if ((device.name == '.....') and (domoticz.time == 'between 22:00 and 30 minutes before sunrise')) then

Thanks.
Arek
Domoticz Version: 4.9895 running on Raspberry Pi B 3+ (Raspbian). PCF8574 as input and output.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: triggering device after another is ON between time

Post by waaren »

Adso76 wrote: Sunday 17 November 2019 12:15 Whats wrong with the following statement ?

if ((device.name == '.....') and (domoticz.time == 'between 22:00 and 30 minutes before sunrise')) then
domoticz.time is a time object and cannot be compared against a rule. You will need something like

Code: Select all

    if device.name == '.....' and domoticz.time.matchesRule('between 22:00 and 30 minutes before sunrise')  then
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Adso76
Posts: 20
Joined: Tuesday 28 August 2018 21:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: triggering device after another is ON between time  [Solved]

Post by Adso76 »

Great thanks! Works!
A.
Domoticz Version: 4.9895 running on Raspberry Pi B 3+ (Raspbian). PCF8574 as input and output.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest