Timer in minutes only for a fan

Still not sure why you are jumping through all these hoops when you can do this:

1 Like

That method won’t work if it’s over 60 minutes. His method does.

Ah, so that is a limitation for more than just the time pattern trigger. Seems to be an unjustified limit here.

I might be wrong… You might be right… I’d need to do tests. You can quickly figure this out if you put in 61 minutes and the yaml complains at you.

I think you are correct, I don’t think there’s a limitation. So yeah, your for template should work fine. I’ll let you know in 70 minutes.

The following config was accepted as valid:

- alias: 'Workshop Lights Auto Off'
  trigger:
  - platform: state
    entity_id: binary_sensor.pir_workshop
    to: 'off'
    for:
      minutes: 61
1 Like

Yeah, I’m running one right now with 70 minutes

1 Like

Times up!

What happened?

Oh I forgot and reset my container… :joy: :rofl: :joy: :rofl:

1 Like

Hi everyone, sorry for the delay.
I’ve tried the following code but it does not work for any value above 60 minutes

- id: cf063a3a5d984cb7a3bc85d225b0a5b0
  alias: Bathroom ventilation timer
  description: ''
  trigger:
  - entity_id: fan.bathroom_ventilation
    for:
      minutes: '{{ states(''input_number.bathroom_ventilation_timer'') }}'
    platform: state
    to: 'on'
  condition: []
  action:
  - data: {}
    entity_id: fan.bathroom_ventilation
    service: homeassistant.turn_off
  mode: single