Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95493

Issues with time condition in automation

$
0
0

@calypso wrote:

So I am using a Wyze door sensor to track when a key is picked up and replaced on the hook. This works great except I have unnecessary repeat events when people are fiddling with the key in order to get it to sit right.

So im trying to put a condition in to say that if the key has been off the hook in the last 1 minute, then dont fire the automation.

I wrote what I think would work but now the automation doesn’t fire at all reguardless of how long it takes.

Any ideas?

- alias: Voice command for when gate tag box is opened. 
  initial_state: true
  hide_entity: false
  trigger:
    platform: state
    entity_id: binary_sensor.wyzesense_778be928
    from: 'off'
    to: 'on'
  condition: 
    condition: state
    entity_id: binary_sensor.wyzesense_778be928
    state: 'off'
    for:
      minutes: 1
  action:
  - service: tts.google_translate_say
    entity_id: media_player.security_office_speaker
    data:
      message: 'State why the entrance gate tag is being used.'

Posts: 5

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95493

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>