Newbie luup : help please

Hello Everybody ,

I want to retrieve the status feedback from my virtual temperature sensor
if the temperature is above zero, I want a “True”, and a “False” if below zero
the VERA don’t want my first code :slight_smile: : “Failed to test code, please try again”
where is my bug ?

I am a beginner.
Thank you for your help
Sorry for my English

local temp = luup.variable_get("urn:upn-org:serviceId:TemperatureSensor1", "CurrentTemperature", 261)
if (tonumber(temp)  > 0)  then
  return true
end

Your English is fine…

…but your spelling of the serviceId is not!

It should be urn:upnp-org:serviceId:TemperatureSensor1

hello
perfect !
thank’s you very MUCH
All is ok

Merci :slight_smile:

Je vous en prie.

You’re welcome.

1 Like

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules