Bathroom fan timer

I wanted to create an automation for when someone turns on the bathroom fan and doesnt turn it off. Does this seem like a good way to go about it?

alias: Basement Bath Fan Timer
description: If fan is turned on and still running 30 minutes later, turn it off
trigger:
  - platform: state
    entity_id:
      - switch.basement_bath_fan
    from: "off"
    to: "on"
condition: []
action:
  - delay:
      hours: 0
      minutes: 30
      seconds: 0
      milliseconds: 0
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.basement_bath_fan
mode: single

With the mode set to “restart,” this automation will trigger every time the bathroom fan is turned on and stays on for 30 minutes.

mode: restart

what is the sequence if its only set to single?

i have another automation that restart may work better. it is for a motion automation with outside flood light

i googled it and now understand.

thanks

This isn’t blueprint related. To get a wider audience looking at this please remove the blueprints designation in the top topic.