I'm trying to read the value of a Luminance sensor so I can (essentially) invert it for a dimmer value. I have a device called Luminance.
This compiles:
- Code: Select all
set value of variable currLux to (get value of device Luminance)
set value of variable "darkness" to (currLux - 1000) * -0.1
But when I Run it I get "the variable Luminance is not defined."
I could work around this by making an Indigo variable called Lux or some such, but this seems more elegant--or it would if I had the syntax right!
So what have I got wrong here? I tried "get value of device name Luminance" and that didn't work either.