By “modified” I mean what changed the value last. Some activities are run through pistons and others through ST apps, I do intend to convert fully to pistons I’m just procrastinating on the best way to do it.
I already use some of the tricks you describe, I have a piston that syncs the light level throughout the house based on the time of day, but only if the current level matches this means if someone has modified it the piston doesn’t reset it. However, I wanted a simpler way to tell how a light was switched on, than multiple check to try to guess, or setting a variable for each light.
Having said that, I would be less against an individual variable per light, of there were a way to make it an attribute of that light. Like [bedroom light : lastmodby] which returned button, switch, motion, etc.