Loading Now

My Sprinklers Clean Up After the Dog

Flat editorial illustration: a cartoon dog trotting to a door while a sprinkler mists a small patch of lawn; a padlock, camera, and droplet linked above.

Dog urine burns grass. Water dilutes it. The rest of this post covers how I make sure the sprinklers can’t run while a dog or a human is standing on the lawn.


the problem

We have dogs and a lawn. The dogs favor specific corners, and those corners turned into a constellation of yellow burn spots. The fix is boring and well known: dilute with water, soon after. “Soon after” is the hard part. No one walks out to hand-water the dog corner four times a day.

I have smart irrigation, and the dog zones are their own valves. So the house handles it.

the naive version, and why I deleted it

The obvious automation: back door opens and closes, run the dog zones for two minutes. I wrote it, stared at it, and deleted it for two reasons.

A door cycling tells you the door moved, nothing more. Half the time it’s a kid going out, or one dog coming in while another stays out. Spray whoever is still out there and the automation (and I) get banned from the house.

There’s also no undo. Once water is flying, “oops” does nothing.

The version I shipped is a chain of confirmations. That chain is the real content of this post.

the safety chain

Step 1: trigger on the door locking, not closing. In our house the back door gets locked once everyone has been inside for a while, an existing habit backed by an auto-lock. A locked back door signals “yard session over” far better than a closed one. Weak signals make spray-happy automations, so pick the strongest signal your house produces without new hardware.

Step 2: wait until the cameras agree the yard is empty. My backyard cameras run AI motion detection on my NVR, and those detections appear in Home Assistant as binary sensors. The automation waits up to ten minutes for the yard motion sensors to go quiet and stay quiet for three. If something keeps moving out there (dog, kid, raccoon with an agenda), the water stays off. A timeout skips the run entirely. Skipping is the safe default.

Step 3: announce before acting, with a cancel button. Before a valve opens, my phone gets “💦 Dog-zone rinse in 2 minutes” with a Cancel button. The button fires a second, tiny automation that sets a flag; the main flow checks the flag before opening anything. The cancel works from my watch, and I have used it from the couch mid-sentence: “hang on, I’m letting them back out.”

Step 4: short, targeted run. Two zones, a few minutes each. This is a rinse, not irrigation. The regular watering schedule has no idea this exists.

the chain matters more than the plumbing

Running a zone on demand is one service call in any smart-irrigation integration. Trust comes from the links: the lock answers “is the session over,” the camera AI answers “is the yard clear,” and the notification gives a human a veto window. A single sensor lies once in a while. Three unrelated confirmations rarely lie at the same time.

I now reuse this shape (strong trigger, independent confirmation, veto window, conservative default) for anything that moves water, heat, or locks. The dog lawn happened to be the funniest place to learn it.

the config

Sanitized and trimmed. Entity names are generic stand-ins: camera motion sensors renamed, irrigation switches are whatever your integration exposes. The cancel flag is an input_boolean.

- id: dog_lawn_dilution
  alias: "Yard — dilution rinse after dogs come in"
  trigger:
    - platform: state
      entity_id: lock.back_door
      to: "locked"
  condition:
    - condition: time
      after: "07:00:00"
      before: "21:00:00"
  action:
    # yard must be clear, and stay clear
    - wait_for_trigger:
        - platform: state
          entity_id: binary_sensor.backyard_camera_motion
          to: "off"
          for: "00:03:00"
      timeout: "00:10:00"
      continue_on_timeout: false
    # arm the veto window
    - service: input_boolean.turn_off
      target:
        entity_id: input_boolean.rinse_cancelled
    - service: notify.my_phone
      data:
        title: "💦 Dog-zone rinse in 2 minutes"
        message: "Yard reads clear. Cancel if you're heading back out."
        data:
          actions:
            - action: "CANCEL_RINSE"
              title: "Cancel"
    - delay: "00:02:00"
    - condition: state
      entity_id: input_boolean.rinse_cancelled
      state: "off"
    # the rinse itself — short, per zone
    - service: switch.turn_on
      target:
        entity_id: switch.irrigation_dog_zone_a
    - delay: "00:03:00"
    - service: switch.turn_off
      target:
        entity_id: switch.irrigation_dog_zone_a
    - service: switch.turn_on
      target:
        entity_id: switch.irrigation_dog_zone_b
    - delay: "00:03:00"
    - service: switch.turn_off
      target:
        entity_id: switch.irrigation_dog_zone_b
  mode: single

- id: dog_lawn_dilution_cancel
  alias: "Yard — rinse cancel handler"
  trigger:
    - platform: event
      event_type: mobile_app_notification_action
      event_data:
        action: "CANCEL_RINSE"
  action:
    - service: input_boolean.turn_on
      target:
        entity_id: input_boolean.rinse_cancelled
    - service: notify.my_phone
      data:
        message: "Rinse cancelled. 🚫💦"
  mode: single

mode: single matters on the main automation. If the door locks again mid-run, you don’t want a second copy racing the first.

results

Weeks in, the burn spots are recovering, the water cost rounds to zero (a few minutes on two small zones), and the cancel button has fired enough times to prove the veto window earns its keep.


The lawn credits none of this to a lock, three cameras, and a notification button. As far as it knows, it rains with unusual precision here.

My name is Skylar Pearce, I have been working as a System Administror since 2013 as well some side consulting work. During my career I have worked with everything from Active Directory and vCenter to configuring routers and switches and phone systems, documenting and scripting my way through the whole thing. I have a Security+ certification and am currently working on my PenTest+. Throughout my career I have gained almost all of my knowledge from blogs like this. It is now time for me to pay it back. Over time I have gathered scripts and tricks over the years that I will share on this site. A lot of the posts here will be mainly reference posts, some will be full on how to’s. I am happy to go into more depth on any other topics I go over here, just make a comment on a post. I will do my best to post once a day on weekdays but as I run out of ideas it may slow down. My WordPress skills are still growing so the site will likely get better over time as I learn. You can reach me at contact@allthesystems.com or on LinkedIn

Post Comment