I have various PIR sensors dotted about the house, and I've long wanted to have a sensor for the PIR which last reported an ON event. I'm not interested in the OFF events, in fact, I rather want to filter them off! Do you think this might be how to go about this? I'm just not sure how I'd (in one automation) use maybe a template to update the variable? I know how to do it in a number of automations equal to the number of sensors I have, but that isn't very elegant! :-)
thanks for the code!!
I have various PIR sensors dotted about the house, and I've long wanted to have a sensor for the PIR which last reported an ON event. I'm not interested in the OFF events, in fact, I rather want to filter them off! Do you think this might be how to go about this? I'm just not sure how I'd (in one automation) use maybe a template to update the variable? I know how to do it in a number of automations equal to the number of sensors I have, but that isn't very elegant! :-) thanks for the code!!