Hey everyone,
I’m maintaining a fork of the popular Switch Manager integration originally created by @Sian-Lee-SA, which has been abandoned for some time. This fork is actively maintained with bug fixes, HA compatibility
updates, new features, and a growing blueprint library.
What is Switch Manager?
Switch Manager lets you manage wireless switch button presses (Zigbee, Z-Wave, MQTT, Events, BTHome, deCONZ, ESPHome, Tasmota, …) through an intuitive UI — without writing automations by hand. You define
blueprints for your switch hardware and assign scripts/actions to each button press and action type (single press, double press, hold, etc.).
Installation via HACS
- HACS → Custom Repositories → add GitHub - macpit/Home-Assistant-Switch-Manager: Switch manager is a centralised component to handle button pushes for your wireless switches. This includes anything passed through the event bus. The component relies on switch blueprints which is easily made to allow GUI configuration of your switches and their button pushes. This helps remove clutter from the automations. · GitHub → Category: Integration
- Install & restart HA
Switching from the original repo? Your switch configs are preserved in .storage/switch_manager — just swap the integration and restart.
What’s been fixed & improved since the original
Bug Fixes
- “Run action” button in the UI was broken — Added a dedicated switch_manager/run_action WebSocket handler; the old code called HA’s validate_config + execute_script endpoints which rejected the action format
(v3.0.7) - HA visual editor action format — HA’s visual editor generates action: instead of service: in script sequences, causing schema validation failures. Added _normalize_config_action() pre-validator (fixes
Sian-Lee-SA#404, v3.0.7) - YAML loading broken in HA 2024.3+ — Fixed incompatible YAML loader usage (fixes Sian-Lee-SA#336)
- HA 2024+ API compatibility — Removed @callback on async functions, updated to async_register_admin_service, async_unload_entry, modern ConfigFlowResult, proper async_create_task usage, updated type hints
- HA Core API rename — Adapted to HA Core renaming config._format_config_error
- Sortable columns in switch list not working — Patched ha-data-table column definitions and property references (v3.0.6)
- SVG switch image too wide — Added max-width: 800px constraint (upstream PR #151)
- MQTT JSON parsing on non-dict payloads — Fixed crash when MQTT payload is not a JSON object
- Homematic blueprints — Fixed press_long → press_long_start for 2/6/8-button devices (v3.0.9)
- Shelly BLU RC Button 4 — Replaced action/hold_press with event_type/long_press, removed duplicate hold entries (upstream PR #424)
New Features
- Duplicate switch — New “Duplicate” option in the three-dot overflow menu: creates a full copy of a switch config (buttons, actions, sequences, variables) with a “(Copy)” suffix and opens the editor ready to
set a new identifier (v3.0.6) - Frontend TypeScript rewrite — The original integration shipped a 5.2 MB obfuscated JS bundle. This fork includes a complete rewrite in clean TypeScript/Lit (~69 KB), making the frontend maintainable and
hackable (v3.0.0)
New Blueprints Added (fork-specific)
- Moes ZG-101ZD / TS004F — Improved state-topic variant (7 → 13 distinct actions) + new event-mode blueprint (v3.0.8/v3.0.9, issue #434)
- Shelly Wall Display XL (PR #14)
- Sonoff SNZB-01M 4-button remote (PR #13)
- Sonoff Mini / ZBMINIR2 / L2 (PR #12)
- Shelly Wall Switch 4U / Shelly Plus i4 U Path (PR #6)
- Philips Hue Senic Friends of Hue — Updated image (PR #7)
Plus all pending upstream PRs that were never merged into the original:
- TuYa 3 Button Scene SS6300ZB (#427)
- Shelly BLU Wall Switch 4 (#424)
- LocalBytes LocalDeck 24 (#423)
- Sonoff MINI-ZB2GS Duo (#420)
- Generic SNZB-01 button (#419)
- Marmitek Push LE/LO remotes (#418)
- Sonoff ZBM5 1C/2C/3C (#417)
- ZHA TuYa 6 Button Scene TS0046 (#416)
- Zigbee2MQTT Moes ZG-101ZD (#410)
- … and more
Total: 230+ blueprints covering Zigbee2MQTT, ZHA, Z-Wave JS, deCONZ, BTHome, ESPHome, Tasmota, Shelly, Lutron, Homematic, Philips Hue, IKEA, Aqara, Sonoff, Inovelli, Zooz and many more.
Current version: v3.0.9
Contributions are welcome — especially new blueprint YAMLs for devices not yet covered. Open an issue or submit a PR!
Greets,
Marc