Replicate "for" in NR?

I have a light sensor that I use to control when my lights turn on/off. I measure this every 1 min and sometimes on a cloudy day, it can go up/down from one minute to the next. Given this, I only want to turn on my light after the light level has been consistently below 350 for 10 mins or more.

In HASS, I do this with the “for” logic. How can I replicate the “for” in NR? Thanks.

  trigger:
    platform: numeric_state
    entity_id: sensor.light_level
    below: 350
    for: 00:10:00
  action:
    entity_id: light.kitchen
    service: light.turn_on

[{"id":"accd5082.a3962","type":"server-state-changed","z":"316b7737.65f728","name":"","version":1,"entityidfilter":"sensor.light_level","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"350","halt_if_type":"num","halt_if_compare":"lt","outputs":2,"output_only_on_state_change":true,"x":242,"y":112,"wires":[["8b4c1bbf.d72288"],["5b186aa6.8b4fe4"]]},{"id":"a3395888.9113d8","type":"api-call-service","z":"316b7737.65f728","name":"","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.kitchen","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":874,"y":112,"wires":[[]]},{"id":"8b4c1bbf.d72288","type":"trigger","z":"316b7737.65f728","op1":"","op2":"","op1type":"nul","op2type":"payl","duration":"10","extend":false,"units":"min","reset":"","bytopic":"all","name":"","x":678,"y":112,"wires":[["a3395888.9113d8"]]},{"id":"5b186aa6.8b4fe4","type":"change","z":"316b7737.65f728","name":"","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":496,"y":160,"wires":[["8b4c1bbf.d72288"]]}]
1 Like

Thanks Kermit! This seems to work… I’ve been scratching my head trying to use the stoptimer function!