From luup code on a scene, I can never retieve live values from devices. Here is one example…it is using the awesome Nest Plugin checking if it is in Home or Away mode and returning a cancel or proceed route for the Scene. No matter what the Status of the Nest, the code returns the same value and in the Nest Device properties, I never see the variables updated, no matter what stat it is in. Is there anything wrong with it? I have tried so many samples posted online to do this or to read the simple Status of a Virtual Switch or Motion Sensor…no luck on anything.
Is there something wrong with this code, or is there something wrong with some other setting on my Vera3 unit?
–
local TSTAT = 70 – HOME/AWAY Thermostat Device
local TSTAT_SID = “urn:schemas-watou-com:device:NestStructure:1”
if luup.variable_get( TSTAT_SID, “Status”, TSTAT) == “1” then
return true
else
return false
end
–
–