Condition using a timer, how do I say when Not Idle

I want to start a timer when I exit a Zone, but if I return with 10 Mins (because) i have forgotten something I don’t want my garage door to open.

So I want to check if the time is still running i.e. NOT idle.

Not sure of the correct syntax

Regards Dave

A running timer has “active” as the state.

syntax depends on how you are using it in the automation. Which you haven’t given us.

Why not just use for: ‘00:10:00’ ?

1 Like

Hi, many thanks for taking the time to reply

Here is my automation:-

- id: '1597055016189'
  alias: Bike Mode Door Garage Open when arriving home
  description: Open Garage Door when entering Bike Zone if Bike Mode On and Alarm
    Not Set
  trigger:
  - entity_id: device_tracker.gt_i9505
    event: enter
    platform: zone
    zone: zone.bike_home
  condition:
  - condition: state
    entity_id: binary_sensor.bike_mode
    state: 'on'
  - condition: state
    entity_id: binary_sensor.garage_alarm_set
    state: 'off'
  - condition: state
    entity_id: timer.garage_door_inhibit
    state: '?'
  action:
  - data: {}
    entity_id: switch.garage_door_open_2
    service: switch.turn_on
  mode: single

So its the timer.garage_door_inhibit that would be started with 00:10:00 when I leave the zone

If I come back after 10 Mins I want the door to open.

  • condition: state
    entity_id: timer.garage_door_inhibit
    state: “What do I put Here for when the times has finished”

Regards Dave

From

Possible states are ‘idle’, ‘active’ and ‘paused’
You want ‘idle’

2 Likes

D’oh, obvious.

Thanks

That’s not what this says…

It makes it difficult to help when you change requirements midstream.

Sorry I had not changed my requirements but just flipped the logic.

I was thinking that if the timer was still running i.e. “NOT Idle” then don’t allow the door to open, but of course thinking about it and seeing that reply I can allow the door to open when the timer is finished.

Very sorry for any confusion

Regards Dave

You do realize that those will both result in the exact same outcome, don’t you?

Unless you are in the habit of pausing your timer then “NOT idle == active”. And “NOT active == idle”.

and if you do pause the timer then all bets are off on when the automation will actually trigger and it would probably defeat the whole purpose of using a timer in this case.