Dev.PowerHandler (BB.TUI v0.2.0)

Copy Markdown View Source

Dev-only command that emits a short battery + power telemetry sweep on [:sensor, :battery_bus], draining a simulated pack from ~95% to ~10% over ~2s so the status bar's battery readout shifts green → yellow → red.

A real robot publishes BB.Message.Sensor.BatteryState (and/or BB.Message.Sensor.PowerState) continuously from its power monitor; this handler fakes that stream on demand so the status-bar indicator is demonstrable without hardware. Because every reading shares the same {path, payload-type} key, the event log collapses the burst to one debounced row per second while the status bar tracks the live value.

Runs in its own command process (so the TUI keeps rendering), returning the state machine to its initial operational state when done.

Goal shape: %{} (no arguments).