Closed antonywinn closed 6 years ago
Nope, pretty sure these need to stay. If you have a look at the luup documentation for luup.variable_get:
From: http://wiki.micasaverde.com/index.php/Luup_Lua_extensions#function:_variable_get
function: variable_get parameters: service (string), variable (string), device (string or number) returns: value (string) and Unix time stamp (number) of when the variable last changed
The variable_get function returns two parameters - the value and a timestamp.
Originally, I didn't have the tstamp variable as I referenced code I found on the internet (luup/lua n00b). After studying the doco, it would appear that we should be using two variables - if you see the example code in the link above it specifically shows two variables being used.
Example:
local period, tstamp = luup.variable_get(VERAFLUX_SID, "Period", parentDevice)
Added as part of debugging, can probably be removed.