Zero-UI
← Back to docs/Automation Rules – Zero-UI Home Automation (2025)

Automation Rules – Zero-UI Home Automation (2025)

Purpose

This document defines non-negotiable rules for writing automations in the Zero-UI Home Automation system.

It exists to ensure:

  • The home remains family-proof
  • Automations remain predictable, reversible, and calm
  • AI-generated code does not drift into complexity, noise, or UI dependence

This file is authoritative for all automation work.


Prime Directive

Automations must make the house feel more human, not more “automated.”


The Automation Standard (Hard Requirements)

Rule 1 — Physical Controls Always Win

  • If a human uses a switch/dimmer/button, the automation must yield
  • Automations must not “fight back” within a reasonable cooldown window

Implementation implication (conceptual):

  • Respect manual overrides and create a short suppression period after manual action

Rule 2 — Automations Must Be Explainable in One Sentence

If you cannot explain an automation to a non-technical adult in one sentence, it does not ship.

Examples of acceptable one-liners:

  • “When the front door opens after sunset, the entry lights turn on.”
  • “If there’s no motion for 10 minutes, lights turn off.”

Rule 3 — Silence Is the Default

Notifications are expensive. Use them only when:

  • The user must act
  • Safety is involved
  • Anomaly detection is highly confident

Banned:

  • “FYI” notifications
  • Repetitive open/close alerts
  • Motion spam

Rule 4 — Fail Quietly and Predictably

Automations must degrade gracefully:

  • If a dependency is down (vehicle API, cloud service), automation must not cascade
  • If state is unknown, default to do nothing unless safety requires otherwise

Rule 5 — No Hidden Coupling

Automations should not rely on “magic” indirect side effects.

  • Prefer explicit triggers and conditions
  • Avoid chains where one automation subtly triggers another unless documented

System Concepts (Shared Vocabulary)

“Physics Inputs”

Sensors that reflect reality and are preferred triggers:

  • Hardwired door contacts
  • Hardwired motion sensors
  • Lux / sunrise/sunset
  • Power state (grid up/down)
  • Presence derived from deterministic sources (not phones alone)

“Soft Inputs”

Less reliable signals used cautiously:

  • Phone GPS presence
  • Cloud-based states
  • Camera-based inference (unless highly confident)

“Manual Override”

A human intentionally took action (switch press, scene selection, dimmer adjustment).

“Cooldown”

A time window after manual override during which automations do not intervene.


Global Design Constraints

Constraint A — “No Dashboard Dependency”

An automation may not require a user to:

  • Open Home Assistant UI
  • Navigate a dashboard
  • “Acknowledge” alerts
  • Manually toggle helper entities to keep normal behavior

Operator controls are allowed, but must not be required for daily life.


Constraint B — Minimize Helpers

Helpers (input_boolean, input_number, etc.) are allowed only when they:

  • Represent a real-world concept (e.g., “Guest Mode”)
  • Have a long half-life and clear meaning

Banned helper patterns:

  • Helpers that exist only to make YAML easier
  • Helpers that require frequent tuning
  • Helpers that create “mode explosion” (10+ overlapping modes)

Constraint C — Prefer Event-Driven Over Polling

  • Use local sensor events for real-time actions
  • Polling is reserved for slow systems (energy/vehicles)

Lighting Automation Rules (Most Important)

Lighting Rule 1 — Lighting Must Feel Instant

  • Hardwired sensors → immediate response
  • Avoid cloud round trips for real-time lighting decisions

Lighting Rule 2 — Never Turn Lights Off Aggressively

Turning lights on is helpful; turning them off can be annoying.

  • Off actions must be conservative and based on strong evidence (no motion + door closed + time threshold)
  • Provide escape hatches (manual override cooldown)

Lighting Rule 3 — Use Context, Not Cleverness

Preferred conditions:

  • After sunset / before sunrise
  • Room occupancy (motion)
  • Entry transitions (door open) Avoid:
  • Overly complex presence logic
  • Predictive guesses

Lighting Rule 4 — Night Behavior Is Different

Nighttime lighting must be:

  • Lower brightness
  • Minimal pathways
  • Non-disruptive

Occupancy Rules

Occupancy Rule 1 — Occupancy Is Room-Local

Do not infer whole-house presence from a single sensor.

  • Room occupancy uses motion/contact sensors
  • Whole-home presence uses conservative aggregation

Occupancy Rule 2 — Avoid Phone-Only Presence

Phones are optional signal input, not authoritative.

  • Network presence and sensor activity are more stable
  • Use multi-signal confidence where possible

Security and “Armed” Behavior Rules

Security Rule 1 — Security Must Not Depend on Automation

If a feature is safety/security critical:

  • It must work even if HA restarts
  • It must not rely on cloud connectivity

Security Rule 2 — “Armed Mode” Is Explicit

Armed/home/away are explicit states, not inferred guesses.

  • If a mode exists, it must be understandable and rarely changed

Notification Rules (Strict)

Notification Rule 1 — Notifications Must Be Actionable

A notification is allowed only if a user can do something with it immediately.

Allowed examples:

  • “Power is out; generator did not start.”
  • “Garage door has been open for 30 minutes (night).”
  • “Water leak detected.”

Banned examples:

  • “Motion detected.”
  • “Door opened.”
  • “Vehicle status changed.”

Notification Rule 2 — Rate Limit Everything

Every notification class must have:

  • Debounce window
  • Cooldown window
  • Maximum repeat count

Notification Rule 3 — Prefer Local Surfaces

When possible, prefer:

  • Light changes (subtle feedback)
  • Brief chime (rare)
  • Apple Home critical alerts only when necessary

AI / Vision Rules

AI Rule 1 — AI Only Filters, It Doesn’t Decide

AI can classify events (person/package), but should not trigger complex behavior by itself.

AI Rule 2 — AI Uncertainty Defaults to Silence

If classification confidence is low:

  • Do nothing
  • Do not notify

Energy Rules

Energy Rule 1 — Energy Automations Must Be Invisible

Energy-based actions should feel like:

  • Comfort improvements
  • Quiet cost optimization

Energy Rule 2 — Avoid Rapid Switching

Do not create oscillations:

  • No rapid load toggling
  • No frequent HVAC setpoint bouncing

Implementation Policy (How Automations Are Built)

Preferred Automation Style

  • One automation = one job
  • Clear naming convention
  • Explicit triggers and conditions
  • Conservative off-timers
  • Document intent in comments

Naming Convention (Required)

Use:

  • domain.area.intent Examples:
  • lighting.entry.auto_on_after_sunset
  • lighting.kitchen.auto_off_no_motion
  • notify.power.outage_generator_failed

Documentation Header (Required Per Automation)

Each automation must include a short header comment:

  • One-sentence explanation
  • Known failure mode
  • Any cooldown behavior

Testing & Safety Rules

Test Rule 1 — All Automations Must Be Reversible

Every automation must have:

  • A way to be overridden manually
  • A predictable return to normal behavior

Test Rule 2 — Incremental Rollout

Automations ship in this order:

  1. Observe-only (logging)
  2. Assist (turn on only)
  3. Full (on + conservative off)
  4. Optimize (context tuning)

Test Rule 3 — No “Big Bang”

Do not deploy 20 automations at once. Small changes preserve family trust.


Banned Automation Patterns (Do Not Implement)

  • Motion → notification spam
  • Phone GPS as sole presence source
  • Complex multi-mode scene engines
  • Automations that require UI intervention
  • Cascading automation chains without documentation
  • Aggressive off logic in frequently occupied areas
  • “Smart home demo” behaviors (color flashes, novelty routines)

Success Criteria

The system is successful when:

  • Family members rarely open any automation app
  • Physical controls always work
  • The home reacts calmly and predictably
  • Notifications approach zero
  • The operator can maintain and improve the system without disrupting the household

Authority

This document overrides convenience. If a proposed automation violates any rule here, it must be redesigned or rejected.