fibaro:get
fibaro:getValue
fibaro:getModificationTime
fibaro:getValue(deviceID, propertyName)
Please note that the return value is of type string. When comparing it with a variable of type number, use tonumber
to convert it first.
-- Get the value of the 'brightness' property of device 11
local
value =
fibaro:getValue
(11,
'brightness'
)
-- The obtained value can be used to do other things in the scene
-- For example, turn off a device when the brightness is above 50
if
(
tonumber
(value) > 50)
then
fibaro:call
(142,
'turnOff'
)
end
fibaro:get
fibaro:getModificationTime