explaingit

redbeardbrowneyes/dog-save-the-lawn

Analysis updated 2026-05-18

0Audience · generalComplexity · 2/5LicenseSetup · moderate

TLDR

A Home Assistant blueprint that detects a full dog potty trip using a door sensor and camera, then runs a script such as watering the lawn afterward.

Mindmap

mindmap
  root((DogSaveTheLawn))
    What it does
      Detects potty trip
      Watches door sensor
      Watches animal sensor
      Runs your script
    Tech stack
      Home Assistant
      YAML blueprints
    Use cases
      Sprinkler dilution
      Custom automations
      Hydrawise watering
    Requirements
      Door binary sensor
      Animal detection camera
      UniFi Reolink or Frigate

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automatically run sprinklers after a dog goes potty on the lawn to dilute the urine.

USE CASE 2

Trigger any custom script, light, or notification after a confirmed pet potty trip.

USE CASE 3

Generate a Hydrawise multi-zone watering script from a simple configuration form.

USE CASE 4

Add a stability window so the automation waits until the yard is fully clear before running.

What is it built with?

Home AssistantYAML

How does it compare?

redbeardbrowneyes/dog-save-the-lawn00kaku/gallery-slider-block04amanrajj/netwatch
Stars00
LanguageJavaScriptRust
Last pushed2021-05-19
MaintenanceDormant
Setup difficultymoderateeasymoderate
Complexity2/52/53/5
Audiencegeneralgeneralops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires an existing Home Assistant setup with a door sensor and a camera that exposes animal detection.

MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Dog Save the Lawn is a Home Assistant blueprint that automatically detects a full dog potty trip and then runs whatever script you want afterward. It was built to trigger sprinklers so they can dilute dog urine on the lawn, but the same detection logic can trigger any script you attach to a confirmed potty trip. The automation watches a door sensor and a camera's animal detection sensor to confirm the whole cycle: the door opens, the dog goes outside, the camera sees an animal, the door opens again, and the door closes to bring the dog back in. Each stage has its own timeout, so opening the door for an unrelated reason will not accidentally trigger the script, the automation just stops quietly and can log why if status tracking is turned on. After the return door closes, the automation does not assume the trip is over immediately. Instead it watches the animal sensor, and optionally a person sensor, and waits until the yard has stayed clear for a stability window of a few minutes before running the script. If the dog or a person is detected again during that window, the timer resets and it waits again. This handles cases like the dog briefly stepping back outside or a family member still being in the garden. To use it, Home Assistant needs a door sensor exposed as a binary sensor with device class door, and a camera or NVR that exposes a binary sensor which turns on when an animal is detected. The README documents setup for UniFi Protect, Reolink, and Frigate cameras specifically, and says other integrations that expose a similar sensor should also work. The repo includes two blueprints: one that watches the door and camera and runs your script when a trip is confirmed, and one that generates a Hydrawise multi-zone watering script from a simple form, for people using Hydrawise sprinkler controllers. Setup involves importing both blueprints into Home Assistant, configuring your animal sensor, and creating the automation from the blueprint with your own entities filled in.

Copy-paste prompts

Prompt 1
Walk me through importing the Dog Save the Lawn automation blueprint into Home Assistant step by step.
Prompt 2
How do I find the correct animal detection binary sensor for my Reolink or UniFi Protect camera?
Prompt 3
Help me set up the Hydrawise multi-zone watering script blueprint from this repo for my sprinkler zones.
Prompt 4
Explain how the stability window and person detection sensor prevent the sprinkler from running too early.

Frequently asked questions

What is dog-save-the-lawn?

A Home Assistant blueprint that detects a full dog potty trip using a door sensor and camera, then runs a script such as watering the lawn afterward.

What license does dog-save-the-lawn use?

MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is dog-save-the-lawn to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is dog-save-the-lawn for?

Mainly general.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.