I thought I would create a pseudo-array and put the most recent values
for %LIGHT in them... maybe 5 of them. Then, whatever value was the
most popular among the 5 would be the one used.
I chose that instead of a Mean Average because a mean would still change often.
I think also instead of making the array like a stack, where the most
recent one is always in the first position, I'll just have another
pointer called %LightRecentNextRecipient which will tell Tasker which
element should be overwritten next. When #5 gets overwritten with the
current %LIGHT value, that NextRecip var would be set to #1, and then
increment by one. I think that will use less code than a true stack,
and the order isn't important here.
Note that I also added another context so that my AutoBright "script"
would not be operational when the camera or video cam are being used.
There may be other apps to add to that list as well.