I want to do a simple thing : test if the current date matches the value of a user variable of "Date" type.
Code: Select all
domoticz.variables("MyDate").value
but:
Code: Select all
domoticz.time.rawDate
So I cannot compare the two. Also:
Code: Select all
domoticz.time.matchesRule('on '.. domoticz.variables("MyDate").value)
As a workaround I now rely on:
Code: Select all
local day = domoticz.time.day
local month = domoticz.time.month
local year = domoticz.time.year
local date = day .. '/' .. month .. '/' .. year
if date==domoticz.variables(MyDate').value then
Is there any good solution?
Thanks!