How do i get hours:minutes notation?

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

Moderator: leecollings

Post Reply
rizzah
Posts: 75
Joined: Monday 17 October 2016 16:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Groningen
Contact:

How do i get hours:minutes notation?

Post by rizzah »

Hi,

Bit of a noob question, but i currently use domoticz.time.hour >= 8 (for example), but i rather use time in hours:minutes (like 8:30).
I noticed you can use domoticz.time.rawTime which responds with hours:minutes:seconds (which could be something to work with), but then a line like if (domoticz.time."rawTime >= 8:30:00) is not working. i Also tried if (domoticz.time.hour >= '8:30:00') but this didnt work either.

Can anyone help me with this?
dannybloe
Posts: 1355
Joined: Friday 29 August 2014 11:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Ermelo
Contact:

Re: How do i get hours:minutes notation?

Post by dannybloe »

That’s not possible as raw is a string (text) and you cannot do numberlike comparisons with it. So you have to stick with what you had.
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest