Advertisement

Home/Automation & Logic

Implement a "Security Level" System (Green/Yellow/Red) with Different Automation Sets

Advanced Home Assistant for DIY Security Enthusiasts · Automation & Logic

Advertisement

Let's be honest. Most "security" setups in Home Assistant are a glorified light switch. You have an "Armed" mode that flips on every sensor and siren in the house, and a "Disarmed" mode that shuts it all off. It's clunky. Think about real life. You don't go from 'totally chill' to 'DEFCON 1' in a millisecond. There's a whole spectrum in between. Here's the thing: context matters. A system that treats 2 PM the same as 2 AM is a dumb system. We can do way better than that.

Advertisement

Defining Your "Threat Weather": Green, Yellow, Red

We're building a "threat weather" system. Simple to grasp, infinitely more useful. Green means all clear. You're home, awake, moving around. This isn't just 'off'. It's your default living state. Yellow is your elevated state. Maybe you're winding down for the night. Or you stepped out to walk the dog. The house is occupied but in a quieter, more alert mode. Red is the full lockdown. You're away, asleep, or there's a confirmed trigger that demands immediate action. Each level isn't just a setting; it's a personality for your home. It dictates how it reacts to the world.

The Brains of the Operation: Inputs, Helpers, and Your Dashboard

Actually, the setup is straightforward. You need one core helper: an `input_select` for your Security Level. That's your master switch. Then, you build the logic that *changes* it automatically. Pair it with other helpers: an `input_boolean` for "Night Mode", a `person` group for occupancy, a sensor for your alarm panel's state. The magic happens in a dashboard. I use a simple button card grid: Green, Yellow, Red. One tap to manually override everything. But the goal is for the system to choose for you, based on rules. Speaking of rules...

Crafting Context-Aware Automations That Don't Annoy You

This is where the rubber meets the road. Your automations now have a powerful condition to check: `{{ states('input_select.security_level') }}`. At sunset, if someone is home, maybe bump from Green to Yellow automatically. When the last person leaves, it goes Red. The beauty? Your "door opens" automation can now behave differently. In Green mode, it might just turn on the hallway light. In Yellow, it could send a polite "Front door opened" notification to your phone. In Red? That's when the hallway light flashes red, a TTS announcement blares, and a critical alert hits your phone. One trigger, three totally different reactions. That's smart automation.

Real-World Scenarios: From "Oops" to "Oh Crap"

Let's talk use cases. You're in Yellow mode, reading in bed. The backyard motion sensor triggers. Instead of a heart-attack siren, you get a notification: "Motion in Backyard - Yellow Mode". You check the camera feed. It's a raccoon. You go back to reading. No harm, no foul. But if that sensor triggers while the system is in Red (you're on vacation), the response is immediate and severe: all outdoor lights flood on, an indoor light starts pulsing, and a siren sounds. The system's response matches the perceived threat. It moves from being a nuisance you'll eventually disable to a trusted partner you actually rely on.