nighttime / daytime

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

Moderator: leecollings

Post Reply
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

nighttime / daytime

Post by poudenes »

Hi All,

Can someone tell me when you what use:

timer = {'at nighttime'}
timer = {'at daytime'}

and

domoticz.time.isNightTime
domoticz.time.isDayTime

Timer will always trigger every minute when its nighttime or daytime.
isNightTime and isDayTime you can use for specific devices to let them do something on day or night?

If im wrong tell me... im struggling with those to haha
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: nighttime / daytime

Post by dannybloe »

The timer = {'at nighttime'} trigger indeed triggers your execute function every minute between sunset and sunrise. domoticz.time.isNightTime returns true if the current time is between sunset and sunrise. So you you can use that if you need to check that in your script (e.g. when a switch is pressed and you want to do something different when it is at night).
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Post Reply

Who is online

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