Model the behaviour first
Directional lighting needs more than two motion triggers. Define how the system handles simultaneous detection, retriggering, occupancy timeout, controller unavailability and manual control.
idle -> entry detected -> directional effect -> occupied -> clear delay -> off
Note: This is a presentation example, not configuration copied from a live home. Pin mappings, addresses and entity identifiers are intentionally absent.
Keep responsibilities clear
Let sensors report observations, the automation own state transitions, and WLED render the requested effect. Avoid splitting timing decisions across all three layers.
Failure handling
- A missed clear event should time out safely.
- A controller restart should not leave lighting permanently active.
- Manual switching should remain understandable.
- An unavailable sensor should be visible rather than silently treated as clear.
Expected output: Walking in either direction produces the matching effect, while two near-simultaneous triggers resolve predictably and the lights still clear.
Publish safely
Use abstract diagrams and rewritten examples. Review all screenshots, traces and snippets for private entity names, network details and location information.