SwitchBot integration cant be added: failed to connect


when adding the SwitchBot integration to Home Assistant I get the error “failed to connect” with no further errors in the logs.

Searching along the internet I found TONS of people having the same problem but no solution whatsoever. So I wonder if this is a general problem and the integration does not work at all.

Does anyone have the integration working on a Raspberry Pi?
I also wonder if there is any bluetooth setup in Home Assistant? I dont find anything about that topic.

I am using a Raspberry Pi 3 with a Raspbee II attached to it and no other bluetooth device connected yet. I am running Home Assistant Operating System (HassOS). I would like to connect the new SwitchBot temperature/humidty sensor. I bought it specifically because I thought I can add it to Home Assistant :frowning:

There is a 1 year old Github issue that is still not resolved, I dont know if it is the same issue:

And another one here:

The switchbot has very poor bluetooth range and even when I get mine to connect, it’ll go in and out of connection constantly.

Not sure how far your switchbot is from your hub with a bt dongle by if it’s any distance its probably just not finding it.

I’d love another solution that is zigbee based as bt is always a connection challenge.

I tried with no success. Does it mean you have it working? On a Raspberry Pi?

Is the integration already searching and trying to connect when adding it? I would have expected to add the integration first and then search for devices.

I’ve had the switchbot integration working for a while, but ran into the same issue recently after some HA update (not sure which to be honest). Location of switchbot and Raspi with HA unchanged, so something must have changed there…

Mine is still working but as noted it goes in and out of connection.

In the latest update, I know they updated the python version and it had an impact to bluetooth. Not sure if this is the reason

I got my first switchbot devices today and couldn’t get the integration to work either.

I found an article how you can use their API if you have a hub. Explaining how to get curtains in there. Which works pretty okay. Using that logic and the API documentation also got the switchbot itself in HA.

Or an article based on that topic

Does mean its now a cloud based integration and not locally. But its at least a work around I guess if you are really stuck with the official integration.

1 Like

There is a ESP32 based project that may work:

I have not tried it yet, but maybe will try it soon.

looks like the integration is no longer working with the latest Switchbot firmware 4.6.
People are investigating the issue (Github info). No solution yet.
Update: latest HA core (2022.7.6) has a working solution.

1 Like