time later then sunrise

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

Moderator: leecollings

Post Reply
straatm
Posts: 19
Joined: Monday 15 January 2018 10:06
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands
Contact:

time later then sunrise

Post by straatm »

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: 62
Joined: Wednesday 26 April 2017 11:50
Target OS: Raspberry Pi / ODroid
Domoticz version: v4.9700
Location: Netherlands
Contact:

Re: time later then sunrise

Post by najtram »

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...
RFLink Gateway → 433Mhz/KAKU switches
Z-Wave → Z-Stick Gen5+
ZigBee → ConBee II
Bluetooth → Soma Smart Shades
Opentherm Gateway → Remeha iSense - Tzerra boiler
ESP8266+CC1101 → ITHO ecofan RFT
P1 cable → DSMR 2.2+ Landys +gyr E350
LAN → Enphase Envoy
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: time later then sunrise

Post by dannybloe »

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 1 guest