Home Assistant Red Alert Automation Notes (Pikud HaOref)

Home Assistant Red Alert Automation Notes (Pikud HaOref)

This post was "inspired" by a recent rocket alert I experienced from Yemen. I thought I'd share how I've set up my Home Assistant to help keep safe during these scary moments.

Quick Navigation

Hardware Summary

Component

Supplier

Model

Notes

Zigbee Sirens

Aqara

T1

Distributed throughout house for maximum coverage

Smart Lights

Philips Hue

Various

RGB-capable bulbs for red alert visual indication

Home Assistant

Self-hosted

Latest

Running on dedicated hardware with Zigbee integration

1. Configure Oref Alert: Set Your Areas

Examples of Home Front Command public messages depicting the division of cities in Israel into alerting areas. These alerting areas (standardised in Hebrew) are essential for configuring reliable alerts from the integration.

Examples of Home Front Command public messages depicting the division of cities in Israel into alerting areas. These alerting areas (standardised in Hebrew) are essential for configuring reliable alerts from the integration.

The first step is installing the Oref Alert integration. This connects your Home Assistant to Israel's official rocket alert system (Pikud HaOref).

You can install it through HACS (Home Assistant Community Store) or manually. Once installed, you'll need to configure it with your specific areas.

The key is getting the area codes right. These correspond to the official areas used by Pikud HaOref. You can find the complete list in the integration documentation, but here are some common ones:

  • Jerusalem: ירושלים

  • Tel Aviv: תל אביב - מרכז העיר

  • Haifa: חיפה

Make sure to use the exact Hebrew names as they appear in the official system.

2. Set Up Your Hardware

A Zigbee E27 on an IKEA light stand. I have one of these indicators in each room. The light turns orange during "preemptive" alerts, red during active ones, and green once the all clear is received.

A Zigbee E27 on an IKEA light stand. I have one of these indicators in each room. The light turns orange during "preemptive" alerts, red during active ones, and green once the all clear is received.

For maximum effectiveness, I recommend:

  • Zigbee sirens in multiple rooms (especially bedrooms and bathrooms)

  • RGB-capable smart lights throughout your home

  • Reliable internet connection with backup (mobile hotspot)

A Zigbee siren connected to the red alert automation. Photo: author.

A Zigbee siren connected to the red alert automation. Photo: author.

The sirens provide audio alerts, while the lights give visual indication - crucial if you're wearing earplugs or in a noisy environment.

3. Test The Integration

Before setting up automations, test that the integration is working properly. You can do this by:

  1. Checking the binary_sensor.oref_alert entity in Developer Tools

  2. Using the synthetic alert feature: oref_alert.synthetic_alert


Model Red Alert Automation

Here's the automation code I'm using that turns on all my lights and activates the sirens when an alert comes in:

Red Alert Automation - Main YAML Configuration

Main automation configuration for Home Assistant Red Alert system. This YAML code turns on all lights in red and activates sirens throughout the house when a rocket alert is received.

yaml
1alias: Red Alerts in Anytown Metro - Activate Specific Sirens
2description: >
3  When a Red Alert is received, trigger some actions and activate the listed
4  Sirens
5triggers:
6  - entity_id:
7      - binary_sensor.oref_alert
8    to: "on"
9    trigger: state
10    alias: Red alert for Anytown Metro Area
11actions:
12  - alias: Turn on lights
13    data:
14      brightness_pct: 100
15      rgb_color:
16        - 255
17        - 0
18        - 0
19    action: light.turn_on
20    target:
21      area_id:
22        - master_bathroom
23        - master_bedroom
24        - foyer
25        - kitchen
26        - family_room
27        - study
28        - deck
29        - guest_bathroom
30  - alias: Activate Specific Sirens
31    data: {}
32    target:
33      entity_id:
34        - siren.master_bathroom_alarm
35        - siren.master_bedroom_alarm
36        - siren.study_siren_alarm
37        - siren.front_door_chime
38        - siren.family_room_alarm
39        - siren.guest_bathroom_alarm
40    action: homeassistant.turn_on

Any RGB-capable lights will turn bright red, while regular lights will just turn on at full brightness.

You May Wish To Add: Notifications

There are tons of ways you can extend these automations to suit your needs.

I've focused on making alerts impossible to miss with both sound and light. These work alongside the official sirens, which usually go off at almost the same time.

The beauty of this system is its redundancy:

  • Wearing earplugs? You'll still see all the lights suddenly turn on and go red

  • In the bathroom where external sirens might be hard to hear? Your in-bathroom alarm has you covered

  • Sound asleep? Having every light in your bedroom suddenly blast on at full brightness will definitely wake you up!

You could take this even further by sending alerts to all your devices, automatically turning on TVs, or integrating with any other Home Assistant-compatible gadgets you have around the house.

Follow-Up Activity: Check A Trace

After you've had an alert (real or test), it's super valuable to check the trace to see how your automation performed. In my last test, I was impressed to see less than half a second of latency between the incoming trigger and all my automations completing!

Other Additions

One thing you might want to add is a reset button to return everything to normal after an alert. Or you could build this functionality directly into the automation itself.

For my Zigbee sirens, I've set them to sound for three minutes and then stop automatically. You can adjust this timing to whatever makes sense for your situation - you probably don't want them blaring indefinitely!

GitHub Repository

For those who want to explore my complete configuration files and automation setups, I've created a GitHub repository with all my Home Assistant Red Alert automation models:

GitHub Repository - HA Red Alerts Model Automations

Feel free to fork, adapt, and improve these automations for your own setup. If you develop enhancements, please consider submitting a pull request to help others in our community stay safe!

Daniel Rosehill

Automation specialist and technical communications professional bridging AI systems, workflow orchestration, and strategic communications for enhanced business performance.

Learn more about Daniel