Editing Racchio Sprinkler Duration During Automation

Hi all. I’m brand new to the HA life. I am trying to set up an automation that will turn on a zone in my racchio sprinklers for 30 seconds if my ring camera detects motion. Trying to deter cats in the end from going in my yard. I can’t seem to edit the duration for sprinkler time. Every time the sprinklers turn on, they stay on for 10 minutes lol.

I stumbled upon a similar post to what I am looking to do and lifted 2 lines of code by including Data and duration thinking it would help me fix my issue but it did not fix it. Took me a bit to get the code from YAML, but here it is. Any help is greatly appreciated! Thank you!

  alias: front test
  description: 'This is a simple test of the cat deterrent.'
  trigger:
  - type: motion
    platform: device
    # Device and entity ID go here
    domain: binary_sensor
  condition: []
  action:
  - type: turn_on
    # Device and entity ID go here
    domain: switch
    data:
        duration: '1' 
  mode: single

1 Like

Add a wait for 30-seconds and then the switch turn off after. I would exempt this automation from running during your normal irrigation times as Racchio will stop whatever is watering and end your schedule.