Parameter numeric_state behaves differently when used in automation as a trigger vs as a condition. It seems like an inconsistency that could be fixed.
I understand that this can be done with templates, which I currently have done at the moment though I’m not too keen on using them when it can be avoided. First I thought it was a bug (albeit a documented one ) but the issue was closed and I was directed here to suggest this as a feature.
This is on the to-do list as far as I am aware. Helpers in numeric triggers didn’t quite make the month of WTH. Only datetime helpers in time triggers.
I would like to see a “for:” option added to the numeric_state condition.
I have an automation that checks every 5 minutes if all conditions are met and when so the AC is turned on. One of the conditions is that the lux level in the bedroom needs to be above 10 lx. So when we open the curtains the lx level goes above 10 and then when checked the condition is true and the AC will turn on. Now sometimes it so happens that we open the curtain and at that same moment the automation fires in which the ac is turned on immediately. I would like it to only turn on when we are allready downstairs. So a for: ‘00:05:00’ option would only make the numeric state condition go true when the lx is above 10 for 5 minutes. I know this was allready added to the trigger side of the automation. But when testing it in the condition part I get an error. So I guess it’s not yet a feature there