Add latest model of Switchbot Lock Pro

Unfortunately it looks like night latch detection is still broken. Discussed here… feature request: Switchbot Lock Pro · Issue #233 · Danielhiversen/pySwitchbot · GitHub

But you can enable this feature manually and it will last until integration reload.
Just go to Developer tools → STATES → look for your lock entity
click on it, and in state attributes set supported_features: to 1 instead of 0.
Then just hit Set states button and your lock card should show lock open now.

Edit:
Is possible make this permanent by customizing the entity inside homeassistant config file.

homeassistant:
  customize:
    lock.<<your_lock_entity>>:
      supported_features: 1

Edit 2:
Does not work. Sorry. I tested this with lock that has night latch enabled at start, but unfortunately when you change this after initialization it will not work. Button will show in UI but it will return error: Entity lock does not support this service

1 Like

@Michal4K Thanks for the tips, I have got it working “permanently” through the config file. Nearly ready to go live.

image

I want to add my Lock with Bluetooth, its actually connectet with Matter.
Every time when i want to login with my credentials or typing in the 2 codes manually i get in the logs the following errors and it is not able to connect via bluetooth

does anyone know what could be the issue?

Logger: switchbot.devices.device
Quelle: runner.py:190
Erstmals aufgetreten: 20:19:39 (15 Vorkommnisse)
Zuletzt protokolliert: 20:22:11

D5-3E-63-87-: Device unexpectedly disconnected; RSSI: -127

Logger: switchbot.devices.device
Quelle: /usr/local/lib/python3.12/site-packages/switchbot/devices/device.py:187
Erstmals aufgetreten: 20:20:42 (2 Vorkommnisse)
Zuletzt protokolliert: 20:24:59

D5-3E-63-87- device not found, no longer in range, or poor RSSI: -127

Logger: py.warnings
Quelle: components/switchbot/config_flow.py:239
Erstmals aufgetreten: 20:19:36 (2 Vorkommnisse)
Zuletzt protokolliert: 20:29:04

/usr/local/lib/python3.12/site-packages/switchbot/devices/device.py:250: FutureWarning: BLEDevice.rssi is deprecated and will be removed in a future version of Bleak, use AdvertisementData.rssi instead return self._device.rssi

I created an invitation code with my existing account, created after that a new account, take the share account code to get access to the devices and tried it again with bluetooth, still the same issues like above

Someone now what could be the issue?

This is now fully working with latest release of HA!
Thanks so much it is very reliable!

@andy73 would you care to describe what is working for you? Have you got the night latch to work?

Everything else seems to work now but in Google Home I still only have the opened/closed indicator but I cannot lock or unlock with assistant. The lock is added to google via Home Assistant integration. Is this working for someone?

Edit: Oh, there still seems to be a delay of several seconds if the lock has not been used very recently. When I unlock or lock it then right after that it works without a delay when I lock and unlock etc again. Does the lock go to sleep mode or something?

Its pretty much instant for me, as is the old lock.

Are you sure it isn’t your bluetooth connection?

I’m quite sure it’s not the bluetooth connection. The server is about a meter or 3 feet from the lock and connection is between -61 to -76 dBm.

For any other bluetooth devices the reaction is also instant even when there have not been any events for a while.

With the lock, when I first unlock the door after some idle time there is a lag of few seconds, and after that locking again and unlocking and so on it is instant.

-61 to -76 dBm for around one meter… that is probably not really good bluetooth adapter.

But few seconds is probably just cased by some ble optimalizations…

It’s built in blutooth of the Dell mini PC that is my server.

I believe it’s good enough, as everything else connected to it are working without issues.

You could try a BT proxy using an esp32 and see if that helps? It might be you onboard BT is getting overwhelmed if you have a ton of BT devices.

I have a few esp32 boards around the house, to distribute the load. Plan to use them, for room detection for dynamic dashboard update.

I don’t have that many bluetooth devices. Two are connected directly, rest of the devices are already connected to esp32 bluetooth proxies in other rooms because there would not be connection at the end of those rooms where I have curtain motors.

Edit: I changed one twero temperature and humidity devices that is directly connected and that’s WiFi, so it’s two, not three.

I’ve been unsatisfied with how inconsistent the unlock speeds are using Matter with their official hubs. I started testing it with the integration instead and I’m shocked to say but it has been consistently faster.

I mostly get 1.5-2.5 seconds with both methods. But far too often I’ll get 4-5 seconds with Matter while only getting low 3’s at worse with the BT proxy. That 2 second difference can feel like forever when you’re waiting at the door for your locally controlled smart device to work.

Edit: I put a ESP32 just 3 feet away from the lock. This is where the Switchbot Hub use to be. I’m shocked at how consistently responsive it has been. I’ve always gotten 1-1.5 seconds from a cold start so far. Why are these super cheap ESP32’s performing better than Switchbot’s overpriced hubs lol?

@balu79 How did you manage to have this?

I just added an ESPHome Bluetooth Proxy near the lock, the lock was device immediately after adding the BT Proxy, I have Home Asistant 2024.8.2, Lock firmware v1.19, but I have only lock and unlock (with ‘unlock’ unlocking and opening the door).

Does it still work for you?

There is a few ways to make this work manually. But if you don’t wont mess with your HA I already open PR Switchbot allow force nightlatch by Michal4K · Pull Request #124326 · home-assistant/core · GitHub which will add checkbox to force night latch mode on your lock.

manual ways are decribed here:

and one more here:

Thank you very much!

I have run pip install --upgrade --no-deps --force-reinstall git+https://github.com/Michal4K/pySwitchbot@lock_pro_night_latch_enabled, restarted HA and reloaded the SwitchBot Bluetooth integration, but nothing has changed.

Does the directory in which I run the command is important? (I just opened the terminal in /root and ran the command as root)

You need to run it inside homeassistant container. So If you are running HAOS first log to ssh → go into container docker exec -it homeassistant /bin/bash then run the pip command

Thank you very much for your help, that worked :pray:

If I may ask, did running the pip command without going to HA container first install something, and if yes, how should I uninstall it?

And last question: will the changes be overridden by next version of HomeAssistant, or will I have to remove them manually when the PR will (hopefully) be merged?