-
-
Notifications
You must be signed in to change notification settings - Fork 35.9k
Add support for switchbot presence sensor #156314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Add support for switchbot presence sensor #156314
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
Hey there @Danielhiversen, @RenierM26, @murtas, @Eloston, @dsypniewski, @zerzhang, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
|
Hi @lukasmalkmus, thanks for this PR! JFYI, the Switchbot Smart Radiator Thermostat support by @zerzhang has just been merged: #155123 Thanks again |
joostlek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a merge conflict
|
This shows "motion" in your screenshot. As its a presence sensor, it would likely be better to show "occupancy" instead, with also the house icon instead of motion icon. |
dc8495d to
8561814
Compare
| # Presence sensors should use occupancy device class instead of motion | ||
| if ( | ||
| binary_sensor == "motion_detected" | ||
| and coordinator.model == SwitchbotModel.PRESENCE_SENSOR | ||
| ): | ||
| self._attr_device_class = BinarySensorDeviceClass.OCCUPANCY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this bit but I didn't want to interfere with existing sensors by changing this, globally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say the light sensor can be called that as well. Unfortunately no lux values so not a lux sensor, but still a light level sensor. Just trying to help out with correct labeling, hope it can be merged soon, bought 7 of these in the hope they were supported, but they were not (yet). Haha.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand, this might not just be the labeling, which is why I was careful.
And yes, same mistake. Bought a bunch just to find out they are not (yet) compatible, lol 🤦
|
@joostlek i see you requested changes but it seems complete now? Is this ready now to review/merge? Or something remaining? |
8561814 to
dfada38
Compare
|
Hello and thanks for this, I purchased mmWave Switchbot Presense Sensor and I would like to see it in Home Assistant (via Bluetooth) like I already do with my others 20+ Switchbot devices. |
0c0dd26 to
b11fc5d
Compare
We are dependant on the core developers who have write access. |
936f528 to
e51c1d0
Compare
|
Hello @zerzhang can you review and approve this PR? |
|
For all, I have had a Chat with the SwitchBot Support and this is what they wrote about adding the mmWave Presence Sensor in the HA integration: November 30th is the launch date for the Presence Sensor, and December 3rd is the release date for the new version. I think for the HA version 2025.12.0 it will be included. |
If this pr is not merged, that wont happen though. Unless i missed a secondary merge request and this one can be closed? |
May be someone will approve/merge this or create a new one just before the new version of HA? |
I do not have merge permissions |
|
@lukasmalkmus You need to approve the following process and get all the inspection items through. |
e51c1d0 to
3b47826
Compare
No, unfortunately I'm not a maintainer and can't merge this PR. |
|
@italo-lombardi changes were made. Unfortunately no response yet from joostlek |



👋 First-time contributor
First contribution to Home Assistant. Created with AI assistance, thoroughly reviewed and tested with actual hardware on HA 2025.11.1. All entities working correctly.
Compact implementation (~93 lines, mostly tests) following recent merged PRs (#155124, #155309). Happy to receive feedback and make adjustments!
Proposed change
Add SwitchBot Presence Sensor support to the switchbot Bluetooth integration.
The device combines mmWave radar, PIR sensor, and light detection. Already supported by PySwitchbot 0.73.0 (PR #410) and the
switchbot_cloudintegration (#155309), but missing from the Bluetooth integration.Changes: Add device type to supported models list and configure platforms (binary_sensor + sensor). Pattern matches Motion Sensor.
Entities: Motion + Light (binary_sensor), Battery + Light level + Signal strength (sensor)
Screenshots
Type of change
Additional information
Checklist
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest(will run if requested)Testing
Tested on HA 2025.11.1 with real hardware. Device discovered automatically via Bluetooth, all 5 entities created and reporting correctly.
Test added following climate panel pattern (#155124), verifying entity counts and attributes.