Lua conditional scene

Which variable to use to check outside temp,
CurrentTemperature or Temperature?

The UPnP defined temperature service is the CurrentTempersture variable in the …:Temperature1 service.

At 10:00 in the morning my curtains close only if :

local dID = 72 – Device ID of Netatmo outside temp
local allow = true – true runs scene if higher than, false don t runs it
local status = luup.variable_get(“urn:upnp-org:serviceId:TemperatureSensor1”,“CurrentTemperature”,dID)
return ((status >= “22”) == allow)

i Have put this in : Also, execute the following Luup code

but sometimes they close even if it is lower than 22

status >= "22"

…is a string comparison, rather than a numeric one.

What you need is…

tonumber(status) >= 22

you re right my mistake
Thank you

[quote=“akbooer, post:4, topic:197828”] status >= "22"

…is a string comparison, rather than a numeric one.

What you need is…

tonumber(status) >= 22 [/quote]