skillfed

pyswitchbee

SwitchBee Python Integration.

pyswitchbee v1.8.3 73.8K downloads/30d#14,923 on PyPI3
Permissive license DORMANT released

What it is and what it does

pySwitchbee is a Python library that communicates with SwitchBee smart home Central Units over the network to control connected devices. It provides an async API built on aiohttp for discovering and controlling various device types—dimmers, shutters, switches, and timed power devices—by setting their state or brightness levels. The library includes both a programmatic interface and a command-line tool for querying device status and issuing commands.

The package is designed for developers building home automation integrations or scripts that need to interact with SwitchBee hardware. It handles the protocol details of communicating with the Central Unit and abstracts device types into a simple object model. However, the project is dormant (last release 2024-07-27, minimal repository activity), so it receives no active maintenance or updates.

Use it for:

  • Build a home automation dashboard that queries device states and sends control commands.
  • Create scheduled tasks to turn lights on/off or adjust dimmer brightness at specific times.
  • Integrate devices into a larger home automation platform or orchestration system.
  • Write CLI scripts to manage shutter positions or timed power switches from the command line.
  • Monitor and log the state of smart home devices for analytics or troubleshooting.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python library for controlling SwitchBee smart home devices over the network, supporting dimmers, shutters, switches, and timed power devices through an async API.

Yes, if you own SwitchBee hardware and need Python-based control. The library is straightforward, has low install friction, and carries no known vulnerabilities. However, be aware that maintenance is dormant—no active support or updates are expected. Suitable for personal projects or integrations where you can maintain the code yourself if needed.

Install

pyswitchbee on PyPI

pip

pip install pyswitchbee

uv

uv add pyswitchbee

poetry

poetry add pyswitchbee

Installing pyswitchbee

Before you install

Low install friction with only two runtime dependencies (aiohttp and awesomeversion). Maintenance is dormant—last release was 2024-07-27 and the repository shows minimal activity (3 stars), so expect no active support or rapid bug fixes.

License in practice

Licensed under Apache License 2.0 (permissive), which allows commercial and private use with minimal restrictions.

Quickstart

pip install pyswitchbee

from aiohttp import ClientSession

async with ClientSession() as session:
    cu = CentralUnitAPI("192.168.50.2", "user", "pass", session)
    await cu.connect()
    devices = await cu.devices

Requires Python 3.9 or later; SwitchBee Central Unit must be accessible on the network and credentials must be valid.

Verify before relying

  • Whether the library maintains compatibility with current SwitchBee firmware versions.
  • What happens if the Central Unit becomes unreachable during operation.
  • Whether the CLI tool is included in the PyPI distribution.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 2 — aiohttp, awesomeversion
Maintenance dormant — 748 days since the last release
Last repo commit
First released
Downloads 73,844/month — #14,923 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyswitchbee-1.8.3-py3-none-any.whl

Keywords: home, automation, switchbee, smart

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentTopic :: Home AutomationTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

switchbee smart home controlpython smart home automationasync home device apidimmer shutter switch controlhome automation library
home-automationasync-apismart-home

More Python Modules packages