Skip to content

feat: add Circulator Fan Pro (W1160) support#508

Open
Onero-testdev wants to merge 3 commits into
sblibs:masterfrom
Onero-testdev:feature/circulator-fan-pro
Open

feat: add Circulator Fan Pro (W1160) support#508
Onero-testdev wants to merge 3 commits into
sblibs:masterfrom
Onero-testdev:feature/circulator-fan-pro

Conversation

@Onero-testdev

Copy link
Copy Markdown
Contributor

Summary

Adds support for the SwitchBot Circulator Fan Pro (W1160) as an encrypted BLE device.

The Pro shares the W1071 Modern Ceiling Fan advertisement layout (which differs from the legacy Circulator Fan — battery and the fan-state byte are swapped), and uses extended commands (57 0F …) with a control-source byte for control.

Features

  • Fan: power on/off, speed (1–100), preset modes (direct / natural / sleep / hurricane), horizontal + vertical oscillation
  • Night light: two-level (high / low) on/off
  • State: parsed from the advertisement (fan on/off, mode, speed, oscillation per-axis, battery, charging, night-light state)

Implementation

  • New SwitchbotModel.CIRCULATOR_FAN_PRO (W1160000) + adv signatures b"\x00\x11\xb3@" / b"\x01\x11\xb3@"
  • New process_circulator_fan_pro advertisement parser
  • New SwitchbotCirculatorFanPro device (SwitchbotEncryptedDevice + SwitchbotFan)
  • New CirculatorFanProMode enum (mode 0x04 is hurricane, not the legacy baby)

All command frames and advertisement parsing were verified against real W1160 hardware.

🤖 Generated with Claude Code

Onero-testdev and others added 2 commits June 2, 2026 16:32
Add the SwitchBot Circulator Fan Pro (W1160) as an encrypted BLE device:
fan power/speed/preset-mode (direct/natural/sleep/hurricane), horizontal and
vertical oscillation, and a two-level night light. State is parsed from the
W1071-style advertisement (battery/fan-state swapped vs the legacy fan).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
switchbot/__init__.py 100.00% <100.00%> (ø)
switchbot/adv_parser.py 97.82% <100.00%> (ø)
switchbot/adv_parsers/fan.py 100.00% <100.00%> (ø)
switchbot/const/__init__.py 100.00% <100.00%> (ø)
switchbot/const/fan.py 100.00% <100.00%> (ø)
switchbot/devices/device.py 69.90% <ø> (ø)
switchbot/devices/fan.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bdraco bdraco closed this Jun 2, 2026
@bdraco

bdraco commented Jun 2, 2026

Copy link
Copy Markdown
Member

Waiting for a PR for switchbot to add this

@Onero-testdev

Copy link
Copy Markdown
Contributor Author

@bdraco Hello, this account is being used by a developer from Switchbot. I don't quite understand what you mean by "Waiting for a PR for Switchbot to add this." I hope you can provide more information. Thanks!

@Onero-testdev

Copy link
Copy Markdown
Contributor Author

Opened the Home Assistant core PR that consumes this: home-assistant/core#173262 (adds the Circulator Fan Pro to the switchbot integration). Draft for now — the manifest still pins PySwitchbot==2.2.0, so its CI will stay red until a release containing SwitchbotCirculatorFanPro is published. Let me know how you'd like to sequence the library release and I'll bump the pin + mark it ready.

@zerzhang zerzhang reopened this Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants