SwitchBot Home Assistant: Official Support Explained
In this article
- Background: From Community Workarounds to Official Support
- How the Official Integration Works
- Which Devices Are Supported?
- How to Choose: Cloud vs. Local Mode
- Common Problems and Troubleshooting
- Costs and Requirements
- Safety and Security Considerations
- Alternatives to Official Integration
- Frequently Asked Questions
Yes, SwitchBot now officially works with Home Assistant. As of 2024, SwitchBot devices can be integrated directly into Home Assistant through the official Home Assistant Cloud (Nabu Casa) or via the local API, without requiring community-built custom components. This article explains what changed, how the integration works, and what you need to know to set it up reliably.
Background: From Community Workarounds to Official Support
For years, SwitchBot users who wanted Home Assistant had to rely on third-party integrations like the popular SwitchBot Integration by Daniel Høyer Iversen or use MQTT bridges. These worked but required manual configuration, frequent updates, and sometimes broke after SwitchBot firmware updates. The demand for an official solution grew as SwitchBot expanded its product line beyond simple button pressers to include thermometers, curtains, locks, and smart meters.
In 2023, SwitchBot began rolling out a local HTTP API for some devices, and in early 2024, Home Assistant added official support for SwitchBot via the switchbot integration in its core. This means you no longer need HACS (Home Assistant Community Store) or YAML configuration for basic functionality. The official integration supports both cloud and local control, depending on your hardware and network setup.
How the Official Integration Works
The official Home Assistant integration for SwitchBot uses two main methods:
- Cloud API: Your SwitchBot account credentials are used to fetch device lists and control devices through SwitchBot's servers. This works with all SwitchBot devices but requires an internet connection and adds latency.
- Local API: For devices that support it (like the SwitchBot Lock, Curtain, and Bot with the latest firmware), Home Assistant communicates directly over your local network using the SwitchBot Open API. This is faster and works even if your internet goes down.
Setup is straightforward: in Home Assistant, go to Settings → Devices & Services → Add Integration, search for “SwitchBot,” and enter your SwitchBot app email and password (or an API token if you have one). The integration will automatically discover compatible devices on your network and in your cloud account.
Which Devices Are Supported?
As of the latest Home Assistant releases, the official integration supports:
- SwitchBot Bot (button presser) – local and cloud
- SwitchBot Curtain (including Curtain 2 and 3) – local and cloud
- SwitchBot Lock (including Lock Pro) – local and cloud
- SwitchBot Meter (temperature/humidity) – cloud only (local support is pending)
- SwitchBot Plug (smart plug) – cloud only
- SwitchBot Humidifier – cloud only
Devices not listed, like the SwitchBot Hub 2’s built-in IR blaster or the new SwitchBot Robot Vacuum, may still require the community integration or a third-party bridge. Always check the official Home Assistant documentation for the most current list.
How to Choose: Cloud vs. Local Mode
When setting up, you’ll be asked whether to use cloud or local control. Here’s how to decide:
- Use local mode if you have a SwitchBot Hub (Hub 2, Hub Mini) or devices with the latest firmware that support the Open API. Local mode is more reliable, has lower latency, and keeps your data on your network.
- Use cloud mode if you have older devices or want to control everything from outside your home without setting up remote access. Cloud mode is simpler but depends on SwitchBot’s servers.
You can also use both simultaneously—Home Assistant will prefer local when available and fall back to cloud if the device is offline locally. This hybrid approach is what most users end up with after updating firmware.
Common Problems and Troubleshooting
Even with official support, you may run into issues. Here are the most frequent ones and how to fix them:
- “No devices found” during setup: Make sure your SwitchBot app is logged in and your devices are online. If you’re trying local discovery, ensure your phone and Home Assistant are on the same Wi-Fi network.
- Local API not working: This usually means your device firmware is outdated. Open the SwitchBot app, go to device settings, and check for firmware updates. The Open API requires firmware version 5.0 or later for most devices.
- Cloud control is slow or fails: Check your internet connection and SwitchBot’s server status. If you have a Hub, try switching to local mode for that device.
- Device state not updating in Home Assistant: The integration polls for updates every 30 seconds by default. For real-time updates, enable the “push” option in the integration’s system options if available, or use a Hub with local API.
If you still have issues, the Home Assistant community forum has a dedicated SwitchBot topic where users share fixes.
Costs and Requirements
The official integration itself is free—it’s part of Home Assistant core. However, there are some indirect costs to consider:
- Home Assistant Cloud (Nabu Casa): If you want to control SwitchBot remotely without exposing your Home Assistant to the internet, you’ll need a Nabu Casa subscription (about $6.50/month or $65/year). This also enables Alexa and Google Home integration.
- SwitchBot Hub: While not strictly required for local control, a Hub (Hub 2 or Hub Mini) is needed for many SwitchBot devices to work locally. The Hub costs around $40–$60.
- API token: SwitchBot provides a free API token in the app (under Settings → Developer Options). You can use this instead of your password for the integration, which is more secure.
If you already own a Hub and have Home Assistant running on a Raspberry Pi or NAS, the total extra cost is zero.
Safety and Security Considerations
When connecting SwitchBot to Home Assistant, keep these points in mind:
- Use a dedicated API token rather than your SwitchBot account password. This limits what the integration can do and makes it easier to revoke access if needed.
- Keep your Home Assistant instance updated. The integration relies on changes in both Home Assistant and SwitchBot firmware; updates often fix security and compatibility issues.
- Be cautious with locks. If you connect a SwitchBot Lock, ensure your Home Assistant is secured with strong passwords and two-factor authentication. A compromised Home Assistant could unlock your door.
- Local network isolation: If you’re technically inclined, put IoT devices like SwitchBot on a separate VLAN to limit their access to your main network.
These are standard IoT precautions, but they matter more when you’re automating locks and security devices.
Alternatives to Official Integration
If the official integration doesn’t cover a device you own, or you want more advanced features, consider these alternatives:
- HACS SwitchBot Integration: Still actively maintained and supports more devices (like the IR blaster and vacuum). It can be installed alongside the official one, but you should disable one to avoid conflicts.
- MQTT Bridge (e.g., SwitchBot-MQTT): A community project that exposes SwitchBot devices over MQTT, giving you full control in Home Assistant. This is more complex but offers the most flexibility.
- HomeKit Bridge: SwitchBot hubs support HomeKit, and you can add HomeKit devices to Home Assistant via the HomeKit Controller integration. This works well for locks and curtains but not for all devices.
For most users, the official integration is now the best starting point. Only explore alternatives if you hit a specific limitation.
Frequently Asked Questions
Do I need a SwitchBot Hub for Home Assistant?
Not for cloud control, but for local control via the Open API, yes—most devices require a Hub (Hub 2 or Hub Mini) to act as a gateway. The Hub also enables the local API for devices like the Lock and Curtain. If you only use cloud mode, you can skip the Hub, but you’ll have higher latency and dependence on the internet.
Will the official integration replace HACS?
For basic devices like Bot, Curtain, and Lock, yes—the official integration covers them. But if you have a SwitchBot IR blaster, vacuum, or other niche products, you’ll still need the HACS integration. It’s safe to run both, but make sure only one integration controls a given device to avoid conflicts.
How do I get the SwitchBot API token?
Open the SwitchBot app, go to Profile → Settings → Developer Options, and tap “Generate Token.” Copy the token and paste it into Home Assistant during setup. The token is tied to your account and can be revoked at any time.
Is local control faster than cloud?
Yes, local control typically responds in under 100ms, while cloud control adds 300–1000ms depending on your internet and SwitchBot’s servers. For automations that need quick reactions (like a lock closing when you leave), local is strongly recommended.
Can I use SwitchBot with Home Assistant without internet?
Yes, if you set up local mode and have a Hub, most devices will work without internet. However, the initial setup and firmware updates require internet. Also, some devices like the Meter only support cloud, so they won’t work offline.