Home Assistant is event-driven — each automation reacts to its own trigger, and they don't really know about each other. That makes a single shared output, like one lamp signalling multiple events by priority, surprisingly tricky to build. You end up juggling input_booleans, helpers, and chained automations just to express "if smoke is happening, ignore everything else."
This project does the same thing with a single Control Group set to Priority mode. Three blink controls — red for smoke, green for doorbell, blue for email — sit inside it with priorities 1, 2, and 3. The engine evaluates conditions every scan cycle and lets the highest-priority one win automatically. When a higher-priority condition fires mid-blink, the lower-priority control is cancelled instantly, and it resumes only when the higher one is no longer active.
- One lamp signals three different HA events — Smoke, Doorbell, Email
- Native priority support — Smoke (1) > Doorbell (2) > Email (3)
- Automatic cancel-and-resume when a higher priority fires
- Read and write any HA entity via a Long-Lived Access Token
- No MQTT broker, no YAML, no code
Event-driven automations are perfect for "when X, do Y" — but they struggle the moment two events compete for the same actuator. Most users end up writing conditional helpers or moving to AppDaemon/Node-RED. We wanted to show that a PLC-style scan-cycle engine with native priority is a much simpler mental model for this kind of problem, and that you can wire it straight into your existing Home Assistant entities with just a Long-Lived Access Token.
What You'll Build- A Read logic that pulls the latest Smoke, Doorbell, and Email states from Home Assistant every cycle
- A Smoke control that blinks the lamp red every 0.5 seconds while smoke is detected
- A Doorbell control that blinks green every 1 second for 15 seconds when the doorbell rings
- An Email control that blinks blue every 1.5 seconds for 10 seconds when a new email arrives
- A Priority Control Group that automatically cancels lower-priority blinks when a higher-priority event fires
- Download and install Grablo software on your device from grablo.co/download
- Get this project from the Grablo Gallery
- Fill in your Home Assistant connection in Settings → Home Assistant → Edit (the HA block is already in the project — just enter the server address and paste a Long-Lived Access Token from HA → Profile → Security → Long-lived access tokens)
- Open each HA action and reselect the entity for your own setup — three Read actions (Smoke, Doorbell, Email) and the Turn On / Turn Off actions on your light entity
- Connect to your device and hit RUN
- Toggle the smoke, doorbell, and email entities in Home Assistant and watch the lamp respond in real time
The first logic, "Read Values, " runs on a plain Always condition with a Home Assistant Integration action set to Read for each of the three entities — binary_sensor.smoke_alarm, binary_sensor.doorbell, and binary_sensor.email_new — assigning their states to the Smoke, Doorbell, and Email variables. Because Grablo re-evaluates every scan cycle, the variables always reflect the latest HA state, which is what the priority controls need.
Logic — Priority ControlThe second logic holds a single Control Group set to Priority mode. Inside it sit three controls: Smoke (priority 1), Doorbell (priority 2), and Email (priority 3). Smoke uses a plain Compare condition (Smoke EQ True) so the red blink keeps going for as long as the sensor stays on. Doorbell and Email use Compare with the Rising Edge option, so a single trigger is enough to start their blink loops.
The Smoke control's actions are simple: turn the lamp on red at 100% brightness, delay 0.5s, turn it off, delay 0.5s. Doorbell and Email wrap their on/off/delay chains inside an Action Group with Repeat for Duration — 15 seconds for the doorbell at 1-second intervals, and 10 seconds for email at 1.5-second intervals. Because the whole thing lives inside a priority Control Group, the engine automatically suspends a running lower-priority blink whenever a higher-priority condition becomes true, and resumes it only after the higher one is done.
That's It!Two logics, one Control Group, three priority levels — and a single lamp now intelligently reacts to three Home Assistant events in the order you want.
Expected Results- Toggle the Email helper in HA — the lamp blinks blue every 1.5 seconds for 10 seconds
- While Email is blinking, ring the Doorbell — the lamp immediately switches to green at 1-second intervals
- While Doorbell is blinking, trigger Smoke — the lamp switches to red at 0.5-second intervals and keeps going until smoke clears
- When smoke clears, the doorbell resumes if its 15-second window hasn't elapsed; otherwise the lamp turns off
This project lives entirely between Home Assistant and the Grablo runtime — no GPIO, no I2C, no extra wiring. You need a device that can run Grablo (any of Raspberry Pi, mini PC, Windows / Mac laptop) and a Home Assistant server reachable from it.
On the Home Assistant side you need one RGB light entity (the project uses light.priority_lamp by default — any RGB-capable light works) and three binary_sensor entities for Smoke, Doorbell, and Email. If you don't have physical sensors, you can wire up Helpers → Toggle to fake them for testing, which is exactly what the demo video uses.
What's Next?- Add a fourth priority — for example, a "motion at night" event that triggers a slow white pulse
- Replace the lamp with a smart siren entity to escalate the smoke alarm physically
- Add a Telegram or push notification action on the smoke control so a high-priority event also goes to your phone
- Use the same priority pattern for a single speaker that announces different HA events
- Switch the Control Group mode from Priority to Round Robin or Sequential to see how the same controls behave under different cycle policies
- Lamp doesn't react: Open one of the Read actions and click the entity picker — if the dropdown is empty, the HA connection is wrong. Double-check the address and that the Long-Lived Access Token is still valid.
- Wrong entities are read: The project ships with example entity IDs (binary_sensor.smoke_alarm, binary_sensor.doorbell, binary_sensor.email_new, light.priority_lamp). Open each HA action and reselect the entity for your own setup.
- Doorbell or Email blinks forever: Make sure their conditions still have the Rising Edge option enabled — without it, the blink loop restarts every cycle.
- Higher priority doesn't override: Confirm the Control Group's mode is set to Priority and that lower priority numbers are assigned to more urgent controls (Smoke = 1, not 3).






Comments