Comparing state (light levels) in code

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Comparing state (light levels) in code

Spencer Ryan
Hi All,

I'm writing some automation to deal with slightly dimming the interior lighting after dusk (Cree LEDs are bright!) that are on Insteon dimmers.

More or less if the lights are turned on (or are already on when dusk happens) and are above 80% I want to turn them down to 80%.

However for the Insteon objects the value could be anywhere from 81-100, "on" or "fast_on".

Is there an easy way to account for this in code? Or will I have to have three separate logic statements, one for the numeric values (81-100) and two more for the "on" states?

Actually now that I think about it, do the percentages get stored in the object as numbers or strings? (if $living_room_lower->state ge 80)?



Check out the vibrant tech community on one of the world's most
engaging tech sites,!
To unsubscribe from this list, go to: