Hey ESP Home community! I’m working on a smart status indicator for my 3D printer using a WS2812B LED strip, and I’m struggling with the operational logic.
I want to make it so that:
- When powered but disconnected: Display a visual effect showing it’s searching for WiFi
- When connected: Restore its previous state from Home Assistant
- When connection drops: After a timeout, revert to the “connecting” indication
Since this is just a status light for my printer, I don’t mind if there’s a brief delay in state updates (e.g., showing “printing” for a few minutes after completion).
This is what I have done so far. I read a few other forum threads here, but I can’t figure out the order of operations and precedence for things like esphome.on_boot
, wifi.on_connect
, etc.
I wanted to display the addressable_scan
effect.
Has anyone implemented something similar? I particularly need help understanding how to sequence these events correctly so they don’t overwrite each other. Any examples of implementing WiFi status indicators with ESP Home would be greatly appreciated!
esphome:
...
esp32:
...
# Enable logging
logger:
# Enable Home Assistant API
api:
...
ota:
...
wifi:
...
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
...
captive_portal:
light:
- platform: fastled_clockless
rgb_order: GRB
chipset: WS2812B
pin: GPIO13
num_leds: 36
name: "Andon light"
default_transition_length:
seconds: 1
effects:
- pulse:
name: "Slow Pulse"
- addressable_scan:
restore_mode: RESTORE_AND_ON