Skip to content

Switchbot integration bots configured as "Switch mode" - not working #71239

Description

@andys73

The problem

I have 3 bots connected to Home Assistant. Two of them are configured as "Press Mode" and one as "Switch mode".
They all worked at one point in Home Assistant. The one in "Switch mode" is not working anymore in core-2022.4.7.
I remove it and add it again to be sure it connects. It is finding the bot and the battery is reported correctly. When I try to switch it from On to Off or from Off to On from Home Assistant it gives the error included in the ticket. Changing the status of the bot from Switchbot app is synchronized correctly in Home Assistant.

What version of Home Assistant Core has the issue?

core-2022.4.7

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

No response

Anything in the logs that might be useful for us?

`2022-05-03 11:07:01 WARNING (SyncWorker_0) [switchbot] Timed out while trying to connect to peripheral (the MAC)
2022-05-03 11:07:01 WARNING (SyncWorker_0) [switchbot] Bluehelper returned unable to connect state: None
2022-05-03 11:07:01 WARNING (SyncWorker_0) [switchbot] Error connecting to Switchbot
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/switchbot/__init__.py", line 406, in _sendcommand
    self._connect(retry, timeout)
  File "/usr/local/lib/python3.9/site-packages/switchbot/__init__.py", line 328, in _connect
    raise bluepy.btle.BTLEDisconnectError(
bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral (the MAC), rsp: None
2022-05-03 11:07:01 WARNING (SyncWorker_0) [switchbot] Cannot connect to Switchbot. Retrying (remaining: 3)`

Additional information

No response

Metadata

Metadata

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions