today I use the following function in LUA:
function timedifference (s)
year = string.sub(s, 1, 4)
month = string.sub(s, 6, 7)
day = string.sub(s, 9, 10)
hour = string.sub(s, 12, 13)
minutes = string.sub(s, 15, 16)
seconds = string.sub(s, 18, 19)
t1 = os.time()
t2 = os.time{year=year, month=month, day=day, hour=hour, min=minutes, sec=seconds}
difference = os.difftime (t1, t2)
return difference
end
would it be possible to have the same functionality in blockly? that way one can create blockly to trigger events when a certain condition has been in effect for a certain amount of time.
blockly timedifference function
Moderators: leecollings, remb0
- gizmocuz
- Posts: 2486
- Joined: Thursday 11 July 2013 18:59
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Top of the world
- Contact:
Re: blockly timedifference function
you will have to make a git pull request for this
Quality outlives Quantity!
Who is online
Users browsing this forum: No registered users and 1 guest