I’m looking to build a template sensor that will tell me how long a light has been on in the last 24 hours (or really how long some sensor has been some defined value today).
I’m able to see when the device’s status was last changed, but I’m not sure this is possible, hints?