if os or domoticz time is....

Easy to use, 100% Lua-based event scripting framework.
Post Reply
poudenes
Posts: 473
Joined: Wednesday 08 March 2017 10:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

if os or domoticz time is....

Post by poudenes » Monday 07 May 2018 17:27

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 with OSMC - RPi3 with Domoticz - Dashticz - MiLight - Nanolead Aurora - KaKu - Logitech Hamony - Nest - RFLink

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

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

Post by dannybloe » Monday 07 May 2018 20:17

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: 473
Joined: Wednesday 08 March 2017 10:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

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

Post by poudenes » Monday 07 May 2018 22:27

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 with OSMC - RPi3 with Domoticz - Dashticz - MiLight - Nanolead Aurora - KaKu - Logitech Hamony - Nest - RFLink

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests