fibaro:get
fibaro:getValue
fibaro:getModificationTime
fibaro:getModificationTime(deviceID, propertyName)
tonumber
to convert it first.-- Get the last modification time of the 'value' property of device 11
local
lastModified =
fibaro:getModificationTime
(11,
'value'
)
-- If it's been at least 10 seconds since the value was last modified
if
((
os
.
time
() - lastModified) >= 10)
then
fibaro:debug
(
'It has been 10 seconds or more'
)
else
fibaro:debug
(
'It has been less than 10 seconds'
)
end
fibaro:get
fibaro:getValue