core icon indicating copy to clipboard operation
core copied to clipboard

Switchbot Lock Pro - toggling locked/unlocked state

Open remcom opened this issue 6 months ago • 16 comments

The problem

My Switchbot Lock Pro is connected with bluetooth and the state is toggling every few minutes between locked and unlocked. The lock itself isn't doing anything. The lock is in a unlocked state

Image

What version of Home Assistant Core has the issue?

2025.6.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Switchbot

Link to integration documentation on our website

https://www.home-assistant.io/integrations/switchbot/

Diagnostics information

No response

Example YAML snippet


Anything in the logs that might be useful for us?


Additional information

No response

remcom avatar Jun 12 '25 19:06 remcom

Hey there @danielhiversen, @renierm26, @murtas, @eloston, @dsypniewski, @zerzhang, mind taking a look at this issue as it has been labeled with an integration (switchbot) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of switchbot can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign switchbot Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


switchbot documentation switchbot source (message by IssueLinks)

home-assistant[bot] avatar Jun 12 '25 19:06 home-assistant[bot]

🔍 Potential duplicate detection

I've analyzed similar issues and found the following potential duplicates:

What to do next:

  1. Please review these issues to see if they match your issue
  2. If you find an existing issue that covers your problem:
    • Consider closing this issue
    • Add your findings or 👍 on the existing issue instead
  3. If your issue is different or adds new aspects, please clarify how it differs

This helps keep our issues organized and ensures similar issues are consolidated for better visibility.

This message was generated automatically by our duplicate detection system.

github-actions[bot] avatar Jun 12 '25 19:06 github-actions[bot]

Got the same issue since updating to 06.2025.

weider1 avatar Jun 12 '25 21:06 weider1

Same here

MikeBP13 avatar Jun 13 '25 04:06 MikeBP13

I'm having the same problem. My automations have gone crazy.

ihsancelebi avatar Jun 13 '25 06:06 ihsancelebi

Last evening it was happening every other minute. This night it was actually occurring almost every other second.

I also have a Switchbot Lock Ultra and this behavior isn't happening there.

remcom avatar Jun 13 '25 07:06 remcom

Can any one help to provide the deugging log? https://www.home-assistant.io/docs/configuration/troubleshooting/#enabling-debug-logging Refer to this and you can enable debug logging

zerzhang avatar Jun 13 '25 11:06 zerzhang

@zerzhang For sure. It happens a few times during this capture

home-assistant_switchbot_2025-06-13T11-28-42.137Z.log

Something i noticed that its only happening when the lock is physically unlocked. When its physically locked the state is stable

remcom avatar Jun 13 '25 11:06 remcom

@remcom Thanks

zerzhang avatar Jun 13 '25 13:06 zerzhang

@zerzhang Maybe its related to the fix Fix encryption disconnect race by @bdraco in https://github.com/sblibs/pySwitchbot/pull/355 that is in version 0.66.0 while 2025.6 is still using 0.64.1 (https://github.com/home-assistant/core/blob/2025.6.0/requirements_all.txt)

remcom avatar Jun 13 '25 13:06 remcom

Same issue here. Slow and toggling.

daicol avatar Jun 15 '25 05:06 daicol

I have 2 SwitchBot Lock Pro devices, same HW, same FW, but only one lock exhibits this behavior - the one configured with night latch. When the lock is unlocked, I get multiple sets of (is unlocking, was unlocked) events.

MikeBP13 avatar Jun 15 '25 15:06 MikeBP13

Yeah, joining the bandwagon here. When I unlock my SB Pro, it does unlock physically, but it doesn’t send any signal back to Home Assistant. So last night, for example, the door stayed unlocked the whole night, but HASS still showed it as locked—as if everything was fine.

Not trying to make a big deal out of it, but it's definitely uncomfortable being unknowingly unlocked, especially in a place where "random" people like to check if someone’s home or away during summer.

I'm manually locking it for now, but wondering if there’s something on the horizon or maybe a temporary workaround—like rolling back HASS to before 2025.06?

Thanks a lot for all the hard work ❤️

mariosemes avatar Jun 15 '25 16:06 mariosemes

Update: the lock which I thought it worked, doesn't. When unlocked, it is shown in HA as locked at one point (random, minutes later). So, bottom line, none of the locks have the correct status in HA. There's something wrong with the latest update.

MikeBP13 avatar Jun 15 '25 16:06 MikeBP13

Can any one help to provide the deugging log? https://www.home-assistant.io/docs/configuration/troubleshooting/#enabling-debug-logging Refer to this and you can enable debug logging

Also dropping the LOG. Hope it helps!

home-assistant_switchbot_2025-06-15T16-48-34.204Z.log

mariosemes avatar Jun 15 '25 16:06 mariosemes

I managed to get the SB Pro working perfect again. I set the Bluetooth to passive scanning and that came good. SB Ultra is still unusable though. Will try moving closer to the RPi to see if that helps as a test

daicol avatar Jun 16 '25 00:06 daicol

Having a similar problem here with the lock Pro connected to home Assistant via Bluetooth proxy. Specifically the lock state is toggling locked and unlocked when I open and close the door. I do not have an issue with the lock state otherwise.

mwolter805 avatar Jun 16 '25 00:06 mwolter805

Same problem... :(

christi-g avatar Jun 16 '25 09:06 christi-g

I managed to get the SB Pro working perfect again. I set the Bluetooth to passive scanning and that came good. SB Ultra is still unusable though. Will try moving closer to the RPi to see if that helps as a test

Update: Tested it next to the Pi and it worked fine. My issue is signal related.

daicol avatar Jun 16 '25 12:06 daicol

Additional information on an environment exhibiting the issue:

Was working fine in 2025.5.x Home Assistant Yellow running RPi 4 ESP32-based Atom S3 Lite Bluetooth proxies running the example build in active mode

Lock is the only device currently attached to its proxy:

Image

Thank you in advance for your time working on this issue.

cmgrayb avatar Jun 16 '25 17:06 cmgrayb

@remcom This is Davidson from SwitchBot. We are looking into the issue at the moment. Will get back to you once we have a solution.

Minsheng avatar Jun 17 '25 07:06 Minsheng

@Minsheng Thanks! Also for supporting home assistant!

remcom avatar Jun 17 '25 07:06 remcom

@remcom This is Davidson from SwitchBot. We are looking into the issue at the moment. Will get back to you once we have a solution.

I saw a v3.0 firmware that at least fixed the behavior using the App and the button in it, but HASS still has issues.

mariosemes avatar Jun 19 '25 12:06 mariosemes

@mariosemes Where did you see that 3.0 firmware? The latest for me is 2.9

remcom avatar Jun 19 '25 19:06 remcom

@mariosemes Where did you see that 3.0 firmware? The latest for me is 2.9

I was spamming SwitchBot support in the chat on their website. They just told me that they pushed a 3.0 firmware, I should open up the the official app and it should popup. Well, it happened, opened up the app, selected Lock Pro and I got the UPGRADE AVAILABLE.

It did fixed the lock, I'm able to use it outside Home Assistant, but HASS is still struggling to get info from it.

mariosemes avatar Jun 19 '25 19:06 mariosemes

I upgraded my Bluetooth to usb 5.3 adaptor, passive scanning. Has been working great so far (1 day) on my RPi 4B.

daicol avatar Jun 19 '25 21:06 daicol

Any progress on the fix?

MikeBP13 avatar Jun 20 '25 06:06 MikeBP13

Same here, not 100% sure, but looks like that it moves to state "locked" when the door (not the lock) is shut, then after X seconds it moves back to "unlocked"

dbuchet avatar Jun 20 '25 12:06 dbuchet

I see no FW updates for the Pro lock in the official app. The behavior of the locks in HA is still erratic and my automations are useless at this point.

To top it up, at random times, the locks get disconnected, even though there are BLE proxies in vicinity and the locks connect to those. With the previous version, the setup was rock solid for 6+ months.

Randomly, one of the locks is reported as unlocking and remains in this state. The other is reported as locked, even though it is unlocked.

The status in the official app is always correct.

I'm using the Bluetooth integration approach if it helps.

MikeBP13 avatar Jun 21 '25 08:06 MikeBP13

We have submitted a PR https://github.com/sblibs/pySwitchbot/pull/360 fix this problem, please wait Or try setting Bluetooth to passive mode, which should solve some problems

Likewindovo0830 avatar Jun 24 '25 04:06 Likewindovo0830