if os or domoticz time is....

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:

if os or domoticz time is....

Post by poudenes »

Hi All,

can someone give me a start how to do follow. The commands are not correct one but to explain what i want:

if domoticz.time (or os.time) is 19:05 then

else if domoticz.time (or os.time) is 20:00 then

i tried everything form information of dzVents Wiki but can't find it

cheers
:D
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: if os or domoticz time is....

Post by dannybloe »

Code: Select all

if domoticz.time.matchesRule('at 20:00') then
else if domoticz.time.matchesRule('at 19:05')
end
or

Code: Select all

if domoticz.time.hour == 20 and domoticz.time.minutes == 0 and domoticz.time.seconds == 0 then
or

Code: Select all

if domoticz.time.rawTime == '20:00:00'
It's all in the documentation.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: if os or domoticz time is....

Post by poudenes »

Thanks. Sometimes I don't see the rules how I need to use them. But thanks for explanation!
dannybloe wrote:

Code: Select all

if domoticz.time.matchesRule('at 20:00') then
else if domoticz.time.matchesRule('at 19:05')
end
or

Code: Select all

if domoticz.time.hour == 20 and domoticz.time.minutes == 0 and domoticz.time.seconds == 0 then
or

Code: Select all

if domoticz.time.rawTime == '20:00:00'
It's all in the documentation.


Verzonden vanaf mijn iPhone met Tapatalk Pro
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest