Magic Caster Wand
Cast Lumos to turn on a room light, or Nox to turn it off. This HACS custom integration connects Harry Potter Magic Caster Wands and their boxes to Home Assistant over Bluetooth, turning spells and button presses into automation triggers and letting Home Assistant send LED and vibration effects back to the wand.
English | 한국어
![]() Control a device with a spell |
![]() Turn on a light with your wand |
What you can do
Connect the wand → perform a built-in gesture → its Spell sensor reports the spell → your automation controls a light or another HA device. The wand recognizes its built-in gestures itself; this basic route does not require a TFLite server or model.
| Feature | How it works in Home Assistant |
|---|---|
| Spell automations | The Spell sensor reports names such as Lumos and Nox; use them to trigger your own actions. |
| Buttons and device status | Wand button binary sensors and battery sensors let you build other triggers and monitor the device. |
| Wand effects | Send predefined effects, set LED colors, clear LEDs, vibrate, or compose a macro. |
| Optional movement tracking | Spell Tracking streams the wand's IMU data for Spell Canvas and server-based recognition; it needs separate setup below. |
| Magic Caster Box | Monitor lid, USB and wand-presence status, battery and connection; control its single TIP LED. It has no vibration motor or wand IMU. Add the box separately from the wand. |
Supported devices and requirements
- Wand models: Defiant, Loyal and Honourable; Magic Caster Box support is also included.
- Home Assistant 2025.4.0 or later, HACS or a manual installation, and a connectable Bluetooth adapter or ESPHome Bluetooth proxy.
- Charge and wake the device, keep it in Bluetooth range, and close other apps if they hold its connection. A proxy needs
bluetooth_proxy.active: truefor GATT connections; active scanning is a separate setting. See Bluetooth proxy setup.
Installation
- In HACS, search for Magic Caster Wand and download it, or use the button above. It is included in the HACS default repository list. For manual installation, copy only
custom_components/magic_caster_wandinto your configuration'scustom_componentsdirectory. - Restart Home Assistant. Open Settings → Devices & services → Add integration → Magic Caster Wand, or confirm its Bluetooth discovery.
- Select your awake wand or box. On its device page, turn on Connect before receiving spells or sending effects. Finding a Bluetooth advertisement alone does not confirm a working connection.
Try the built-in gestures
These are the wand's native gesture reference and two examples to start with. Follow the arrows and the wand's normal casting instructions.
Lumos![]() |
Nox![]() |
The full gesture gallery preserves the remaining reference images. A reference image alone does not mean that every listed gesture is recognized by the wand's native firmware or an available external model.
Make Lumos turn a light on and Nox turn it off
Create an automation in Home Assistant and use this YAML, replacing every occurrence of sensor.mcw_example_spell and the light IDs with yours. Find the actual Spell entity on the wand's device page. You can replace the light actions with actions for another HA device.
alias: Wand — Lumos and Nox
triggers:
- trigger: state
entity_id: sensor.mcw_example_spell
attribute: last_updated
actions:
- choose:
- conditions: "{{ trigger.to_state.state | lower == 'lumos' }}"
sequence:
- action: light.turn_on
target:
entity_id: light.example
- conditions: "{{ trigger.to_state.state | lower == 'nox' }}"
sequence:
- action: light.turn_off
target:
entity_id: light.example
mode: single
The conditions normalize spell names to lowercase, so Lumos and lumos both match. The trigger watches the last_updated attribute, so casting Lumos twice can trigger twice even when the spell name stays the same. In integration options, Spell Timeout resets the reported spell to awaiting after the configured seconds; 0 (the default) keeps the last spell until the next update. The example ignores awaiting because it only acts on Lumos or Nox.
Send effects back to the wand
Use Developer tools → Actions or an automation to call these actions with a target entity belonging to the intended wand or box:
| Action | Purpose |
|---|---|
| magic_caster_wand.play_spell | Play a predefined LED/vibration effect such as lumos or incendio. This plays an effect; it does not cast a gesture into your automation. |
| magic_caster_wand.set_led | Set group, rgb_color and optional duration for a wand LED group. |
| magic_caster_wand.clear_leds | Turn off LEDs. |
| magic_caster_wand.vibrate | Vibrate the wand; one command produces about 800 ms regardless of requested duration. |
| magic_caster_wand.send_macro | Combine LED changes, delays, buzzes and loops in a custom sequence. |
For example, play the Lumos effect on the wand (replace the target entity):
action: magic_caster_wand.play_spell
target:
entity_id: sensor.mcw_example_spell
data:
spell: lumos
The box has only the TIP LED group and ignores vibration macro commands. See the action reference for the longer descriptions.
Spell Canvas and optional server recognition
Spell Canvas is a camera entity showing the path of a cast, its drawing state and the recognized spell. It is an optional route beyond the wand's built-in spell reports.
- Set up a compatible hass-tflite server and load a compatible
model.tflitethrough its web UI. Set TFLite Server URL in the integration's options to a URL reachable from HA. The model is not publicly provided by this project. - Connect the wand, then enable Spell Tracking. In the current implementation it starts IMU streaming after the remote detector initializes; a missing/unreachable server or model can prevent tracking from starting. Do not assume a model-free drawing fallback.
- Open the wand's Spell Canvas camera. To keep it on a dashboard, edit the dashboard, add a Picture entity card and select that camera entity.
- Hold all four wand button/touch sensors together, then move the wand to draw. The canvas shows TRACKING while all four are held. Release any one of them to finish the stroke and request recognition; it returns to READY. A successful result updates the same Spell sensor used by your automations.
- Check the actual Spell Tracking switch and the canvas status if no path appears. SERVER OK records a successful server check during initialization; it does not guarantee recognition of every gesture. Check tracking again after reconnecting.
Server screenshots and the original Spell Canvas walkthrough remain available. Built-in wand spell automations remain the starting point when you do not have the external model.
Connection help and documentation
Bluetooth discovery, connection and successful command execution are separate stages. If the wand disconnects, wake it and turn Connect on again; check proxy slots, distance and other connected apps. Hardware and firmware combinations vary; see troubleshooting and diagnostic entities.
- Setup, options and connection details (English)
- Complete gesture gallery, media, Spell Canvas and action reference (English)
- Development and tests (English)
- Standards and verification record (Korean)
Support
- Issues: Report bugs or request features.
- Discussions: Ask questions and share your experience.
License
Released under the MIT License.



