Page 1 of 1

nighttime / daytime

Posted: Wednesday 04 October 2017 20:03
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

Re: nighttime / daytime

Posted: Thursday 05 October 2017 17:25
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).