The SwitchBot integration allows you to control SwitchBot devices.
In order to use this integration, it is required to have working Bluetooth set up on the device running Home Assistant. A SwitchBot Hub is not required for this integration.
In order to set up this integration, you need to get the BTLE MAC address of your device. You can find the address for your device using the following steps:
- Open the SwitchBot app.
- Open device settings.
- Click on “Device Info”.
- Write down the BTLE MAC address of your device.
Please note, device names configured in the SwitchBot app are not transferred into Home Assistant.
Adding SwitchBot to your Home Assistant instance can be done via the user interface, by using this My button:
If the above My button doesn’t work, you can also perform the following steps manually:
There are three attributes available on the SwitchBot entity to give you more information about your device.
trueif the last action sent to the SwitchBot succeeded. This attribute is useful for error trapping when Bluetooth connectivity is intermittent. If
false, see home-assistant.log for specific error messages.
Switch mode: Specifies the mode of the SwitchBot. If
truethe the SwitchBot is in Pull/Retract mode for toggle switches otherwise the bot is in momentary switch mode.
MAC address: The BTLE MAC for the device.
There are four options that can be configured for the SwitchBot entities. Setting any of these options will apply to all of your SwitchBot devices.
Time between updates (seconds): Increase/Decrease the update interval for the device. (Could impact battery life)
Retry count: How many times to retry sending commands and retry polling your SwitchBot devices.
Timeout between retries: How long to wait before retries.
How long to scan for advertisement data: Bluetooth LE uses advertisement data for device statuses and/or attributes. This setting specifies how long the scan should run.