1) Give a description of the problem
I’m all kinds of proud of myself, creating and calling variables in this one. I’m sure it can be improved upon and would like any pointers. The goal of this piston is to set light levels based on ambient light, and to not be dependent on Location Mode. I hacked away at bangali’s Motion Based Light piston as a start, and got it working to where lights would turn on if already off or below {currrentModeLevel}, but do nothing if the light was already set to a higher level.
My first try at a global variable piston seems to be working. I created a {@outdoorIlluminance} variable that can be “dawn”, daylight", “dusk”, etc.
With the motion piston, in the last IF, I use those global variables to set my {currentModeLevel}
I suspect there is an easier way to set {currentModeLevel} than the way I am doing it.
I plan on replicating this piston in several rooms, making changes to light levels per room as needed.
2) What is the expected behavior?
It seems to be working, just looking for refinements.