I’m trying to convert all my automations from home assistant to Node-Red and I need help with this simple automation:
alias: Turn off 1st Floor Bathroom Exhaust fan after 20 min
trigger:
- entity_id: switch.1st_floor_bathroom_exhaust_fan
for: 0:20:0
from: ‘off’
platform: state
to: ‘on’
condition: []
action:
- data:
entity_id: switch.1st_floor_bathroom_exhaust_fan
service: switch.turn_off
I’m having a problem figuring out a replacement for “for” in the trigger phase. as you can see the trigger will check on the status of the switch for 20 minutes and if it didn’t change then it will go ahead and turn off the switch.
You can probably call this a timer but in my case I want the timer on the trigger not on the action or the condition so if the status of the trigger changes before 20 min has past then there will be no action taken or needed.
I’m looking for an easy way to set this up in Node-Red.
any help will be much appreciated.
Thank you