Shelly Fail‑Safe Detached Mode: Gen2/Gen3 Script That Auto‑Flips Gen1 (Shelly 2.5) Between Detached and Toggle When Home Assistant Is Down
A lightweight, on‑device script for Shelly Plus/Gen2/Gen3 that pings Home Assistant and automatically:
- Keeps smart‑bulb circuits in detached mode when HA is healthy.
- Switches Shelly Gen1 (e.g., Shelly 2.5) to toggle/edge for direct wall‑switch control when HA is down.
- Optionally flips the hosting Gen2/3 device’s input mode to ensure local control even with LAN/WAN outages.
This provides a guest‑proof, local‑first, no‑cloud fallback so lights still work from the wall switch during server, automation, or network failures.