--- id: switchbot-api version: "2.13.0" license: MIT license_treatment: permissive maintenance: active --- # switchbot-api — An asynchronous library to use Switchbot API License: permissive · Maintenance: active · Downloads: 73.4K/mo ## What it is and what it does switchbot-api is an async Python client for the official SwitchBot API, letting you query, monitor, and control SwitchBot devices and remotes from Python code. It wraps the REST API with async/await patterns, handling the cryptographic signing required by SwitchBot's authentication scheme through pycryptodome and managing HTTP requests via aiohttp. The library is designed for home automation and IoT integration scenarios where you need to programmatically list devices, check their status, or send commands. It's actively maintained, supports modern Python versions (3.10–3.14), and has no known security vulnerabilities. Installation is straightforward with a pure-Python wheel and only two runtime dependencies. Use it for: - Build a home automation dashboard that queries SwitchBot device status and sends control commands asynchronously. - Integrate SwitchBot devices into a larger smart-home orchestration system via REST API calls. - Create scheduled or event-driven automation workflows that toggle SwitchBot remotes or devices based on external triggers. - Monitor SwitchBot device state in real-time for logging, alerting, or analytics purposes. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. An async Python library for controlling SwitchBot devices and remotes through the official SwitchBot API, handling authentication and command execution. Yes. The library is actively maintained, has low install friction, carries a permissive MIT license, and has no known vulnerabilities. It fills a clear niche for Python developers integrating SwitchBot devices into automation workflows. The async design aligns with modern Python practices. Install it if you're building SwitchBot automation. ## Install pip install switchbot-api uv add switchbot-api poetry add switchbot-api ## Installing switchbot-api Before you install: Low install friction with a pure-Python wheel. Actively maintained as of 2026-08-10 with recent releases. Supports current Python versions (3.10–3.14). License in practice: MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both personal and commercial projects. Quickstart: pip install switchbot-api from switchbot_api import SwitchBotAPI client = SwitchBotAPI(token="xxx", secret="yyy") devices = await client.list_devices() status = await client.get_status('some-id') await client.send_command('some-id', {COMMAND}) Requires Python 3.10 or later. Caller must provide valid SwitchBot API token and secret, and must use async/await context. Verify before relying: - Whether the library handles token/secret rotation or refresh automatically, or if caller must manage credentials. - Rate limiting behavior and retry logic when calling the SwitchBot API. - Whether error handling distinguishes between network failures, authentication failures, and device-specific errors. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 73.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags switchbot api client, async switchbot control, switchbot device automation, switchbot remote control, home automation switchbot, switchbot python library, iot device control api, home-automation, iot, async-api [View on SkillFed](https://skillfed.io/packages/switchbot-api) · [View on PyPI](https://pypi.org/project/switchbot-api/)