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