Skip to content

A Bluetooth switch for turning on the Mi Box S without a remote controller in Home Assistant (inspired by @frlequ & developed with the assistance of @chatgpt)

License

Notifications You must be signed in to change notification settings

DenizOner/MiPower

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

MiPower — Home Assistant custom integration

Release Home Assistant HACS HACS Issues License

MiPower is a focused Home Assistant custom integration that provides a switch platform to send wake/power signals to devices like Mi Box / Android TV boxes. It intentionally focuses on signaling (wake/power), not on long-lived pairing/remote control connections.


Highlights

  • Easy setup using existing media_player devices.
  • Advanced setup for manual configuration (Display name, MAC, device selection).
  • Full Options-flow support (options gear visible after setup).
  • Per-entry coordinator model (each config entry has its own coordinator and options).
  • __pycache__ cleanup service available: mipower.cleanup_pycache.
  • Diagnostics support and options for tuning debounce and connection behavior.

Requirements & Compatibility

  • Home Assistant: tested with 2025.9.3, but backwards compatibility starts from 2021.12.0 per manifest.
  • Python dependency: pexpect.
  • Platforms: switch.
  • Integration type: local push / UI config flow.

Installation

HACS (recommended)

  1. Add this repository to HACS (Integrations → Custom repositories → add repo URL).
  2. Install the integration from HACS.
  3. Restart Home Assistant.

Manual

  1. Copy the custom_components/mipower/ folder into config/custom_components/.
  2. Restart Home Assistant.

Quick Setup (UI)

  1. Settings → Devices & Services → Add Integration → MiPower.
  2. Choose between Easy setup (select a media_player device only) or Advanced setup (enter Display name, MAC, select device, and tune advanced options).
  3. After creation, the Options (gear) is available on the integration panel to adjust parameters.

Entity Behavior

  • Entity name format: MiPower - <media_player name>.
  • Entity icon: mdi:power.
  • Unique ID format: mipower_<MAC_without_colons_uppercase> (e.g. mipower_E0B655526C00).
  • Each config entry has a dedicated coordinator to support multiple devices and options per entry.

Diagnostics & Debugging

  • Diagnostics available from the integration panel (entry-level).
  • Service mipower.cleanup_pycache available under Developer Tools → Services.

Contributing & Issues

  • Please file issues on GitHub: Issues.
  • Pull requests welcome — keep code modular and test changes against a recent Home Assistant instance.

License

This project is released under the MIT License. See the LICENSE file in the repo.

About

A Bluetooth switch for turning on the Mi Box S without a remote controller in Home Assistant (inspired by @frlequ & developed with the assistance of @chatgpt)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages