time later then sunrise

Easy to use, 100% Lua-based event scripting framework.
Post Reply
straatm
Posts: 17
Joined: Monday 15 January 2018 11:06
Target OS: Windows
Domoticz version:
Contact:

time later then sunrise

Post by straatm » Friday 09 February 2018 14:32

How can I compare in dzVents if present time is later then sunrise? I want to use this in an if statement.
I tried already several options but nothing seems to work.

User avatar
najtram
Posts: 42
Joined: Wednesday 26 April 2017 11:50
Target OS: Raspberry Pi
Domoticz version: v4.9700
Location: Netherlands
Contact:

Re: time later then sunrise

Post by najtram » Friday 09 February 2018 14:59

I'n not that into dzvents, but you could create a virtual switch (and hide it with a $ starting name.) and let that switch autoswitch when sunrise. So then if $YOURSWITCHNAME is ON then....

how this helps...
Domoticz on Raspberry Pi 3 with USB RFLink Gateway at 433 Mhz for several KAKU switches. Bluetooth Soma Smart Shades. USB Opentherm Gateway connected to Remeha iSense with Remeha Tzerra boiler. ITHO ecofan RFT (ESP8266+CC1101). Almost running homebridge.

dannybloe
Posts: 1486
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi
Domoticz version:
Location: Ermelo
Contact:

Re: time later then sunrise

Post by dannybloe » Friday 09 February 2018 18:42

Code: Select all

if (domoticz.time.matchesRule('at daytime')) then
	-- do your thing
end
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests