I’m trying to set myself a reminder for when I’ve left on a switch that plays audio from my receiver on my back porch. It’s a physical switch, so I can’t get data from it.
I can, however, get the state for whether there’s been occupancy on my porch and whether the receiver is in a state where it might be playing on the porch.
So I’d like to know if the two states overlapped (receiver zone two on and porch occupied) for a given period (say, for 15 minutes) in the last several hours.
I know that I could make a template sensor that’s true when the two things overlap, then use a history stats sensor to summarize when that sensor was true. History stats sensors use a single entity_id.
Is that overkill, or is there a more elegant way to roll that up into one sensor so that I can query it, say, at bedtime?
Thanks!