Thats not the reason that it isn’t working… The single quotes are irrelevant in this situation. I have many Numeric_State and State triggers that have single quotes.
Its the FOR statement in the Numeric_State Condition that doesn’t work. Is this by design?
There is also nothin being duplicated. When you have multiple triggers they count as OR. So right now if the sensor says that Benji OR Bridget is home for 2 minutes the automation occurs.
When I stack multiple conditions like this it counts as AND. so basically Both have to be true. My issue is that since I cant add the For statement in the numeric_state CONDITION so right now only one person has to be home for 2 minutes rather than BOTH people
Either a template sensor, or a template trigger/condition.
Or you can look at it from a different perspective and daisy chain a few bits together to get the same effect (like setting input booleans based on the triggers, and using them as the conditions)
I quite like doing the latter because I can visualise it better, but a lot of it is personal choice over ‘best practice’.
Based on the names of the sensors it appears this is an occupancy based logic, so numeric_state is not ideal and converting that to some kind of home/away (boolean or otherwise) early on is going to be a lot easier.
So, if it was me I would have an input_boolean that sets on for each of you when the numeric state is over 25 for 2 minutes, and off for whatever you use to define ‘away’, and then use the state of the input_booleans for the trigger and condition of the automation.