cancel
Showing results for 
Search instead for 
Did you mean: 

Home automation repeats multiple times, but should run only once

Apolymoxic
Community Member

I have an automation that, when movement is detected via a camera, it broadcasts a message - "Movement in the front yard detected". But it repeats over and over again until the movement has stopped. 

 

Is it possible to have it broadcast only once and then stop? Perhaps don't broadcast again for the next 10 minutes?

Here is what I have:

metadata:
  name: Front Exterior Motion
  description: Announce when someone is here

automations:
  starters:
    - type: device.event.MovingVehicleDetection # A moving vehicle has been detected by the camera.
      device: Front Exterior camera - Front Exterior
    - type: device.event.PersonDetection # A person has been detected by the camera.
      device: Front Exterior camera - Front Exterior

  condition:
    type: home.state.HomePresence
    state: homePresenceMode
    is: HOME

  actions:
    - type: assistant.command.Broadcast
      message: "Movement in the front yard detected"
      devices:
        - Location 1
        - Location 2
        - Location 3
        - Location 4
    - type: time.delay
      # Adjust duration as needed. Supported units: sec, min, hour
      for: 10min

 

Any help is greatly appreciated!

2 REPLIES 2

_shahparth
Community Member

Have you found the solution to this problem? I'm trying to do exactly what you're doing here and I'm facing the same issue.

The time delay hasn't helped me either. 

No. I never found it. The delay never worked. 

If you get it to work, please let me know and I'll try again.