When using numeric_state or state triggers as well as when using state conditions it is possible to use the “for” attribute on the condition to specify for how long the condition will have to be met before the trigger fires / the condition is fulfilled.
condition: state
entity_id: binary_sensor.thingy
state: 'on'
for: 60
Condition only passes when binary_sensor.thingy is on for at least 60 seconds. Also see state condition documentation.
However, when I try to add a for: to a numeric_state condition, I get an error.
Invalid config for [automation]: [for] is an invalid option for [automation]. Check: automation->action->0->choose->0->conditions->5->for. (See ?, line ?).
Am I doing something wrong? Is for: simply not supported for numeric_state conditions? Why is that? It appears to be supported for numeric_state triggers.
Thank you for the clarification @tom_l. I did refer to the documentation, and noticed it wasn’t explicitly listed, but it wasn’t clear to me if this was just a gap in the documentation or it actually wasn’t supported. It seemed a little inconsistent that the for: attribute was supported on state conditions and all state triggers (including numeric_state triggers), but not on numeric_state conditions. That’s why I posted for clarification.