Wednesday, April 29, 2026

SwitchBot Automation: Set Up Temperature-Triggered AC Control with Just the App [No-Code Edition]

This article is for people who want to automatically control their air conditioner based on room temperature — no programming required. Using only the "Automation" feature built into the SwitchBot Hub 2 app, you can set up automatic AC on/off based on room temperature in under 5 minutes.

3 approaches compared

There are three ways to accomplish the same thing. This article covers the SwitchBot app Automation approach.

(1) Raspberry Pi
+ cron
(2) SwitchBot
Automation
(this article)
(3) IFTTT
Integration
Extra hardwareRaspberry Pi requiredNoneNone
SetupPython code
+ cron config
App only
(easiest)
IFTTT account
+ applet config
TriggersUnlimited
(Python handles anything)
Temperature, time,
presence detection, etc.
Strength in GPS,
weather, other services
CostPi electricity only
(~1–2 W)
FreeFree plan limited
to 2 applets
Logic complexityHysteresis, logging,
extensions — fully free
AND/OR basicsSimple IF→THEN
rules only
Cloud dependencySwitchBot API onlySwitchBot
cloud only
IFTTT +
SwitchBot cloud

If you need GPS or external service integration, see the IFTTT article. If you want to write complex logic in Python, see the Raspberry Pi article (series list at the bottom).

What you can do with this

  • Set up temperature-triggered automatic AC control using only the SwitchBot app
  • No Raspberry Pi or programming required whatsoever
  • Setup takes under 5 minutes, works entirely from a single smartphone

What you need

  • SwitchBot Hub 2 (check on Amazon) — an IR hub with a built-in temperature/humidity sensor. This one device is all you need
  • Air conditioner (any brand that uses an IR remote)
  • Smartphone (iOS or Android)

Prerequisite: register your air conditioner in the SwitchBot app

To control the AC via Hub 2, you first need to teach the app your AC's IR codes.

  1. SwitchBot app → tap "+" in the top right of the home screen → "Add Infrared Remote"
  2. Select "Air Conditioner" → choose your brand (use a preset if available)
  3. If your brand isn't listed, use "Learning Remote" to capture the signal from your physical remote
  4. Verify you can turn the AC on and off from the app

This registers the AC as a "virtual IR remote" in the SwitchBot cloud. This step is required no matter which of the three approaches you use.

Setting up Automation

1. Open the Automation screen

Tap the "Automation" tab at the bottom of the SwitchBot app. Tap "+" in the top right to create a new rule.

2. Set the condition (IF) — the rule to turn AC ON

"Add Condition" → "Device Status" → "Hub 2" → "Temperature" → select "28°C or above."

3. Set the action (THEN)

"Add Action" → "Control Device" → select your AC → "Power On." You can also specify the target temperature and mode if you want.

4. Save and enable the Automation

Give it a name (e.g. "Turn AC on when hot") and save. Flip the toggle to enable it.

5. Add an OFF rule too

Follow the same steps to create a separate rule: "Turn AC OFF when temperature drops to 25°C or below." Without this, the AC will run indefinitely — always create the OFF rule as a pair. Setting a gap between the ON and OFF thresholds (hysteresis) prevents the AC from rapidly cycling on and off when the temperature hovers near the threshold.

Advanced: adding a time-of-day restriction

If you don't want it running late at night, add "Time: 8:00–23:00" as an AND condition. When you combine both a "Device Status" condition and a "Time" condition, the action only fires when both are satisfied simultaneously.

Limitations of SwitchBot Automation

  • Conditions support AND/OR combinations. Complex branching or calculations are not possible
  • Activity history is viewable in the app, but CSV export and similar options are not available
  • GPS location triggers are not supported (if you want the AC to turn on before you get home, see the IFTTT article)

Note: The steps in this article were verified as of April 2026, but app updates may cause the UI or options to change. If something doesn't work, please let me know in the comments.

Wrap-up

SwitchBot Automation is the simplest way to get temperature-triggered AC control with no extra cost and no extra hardware. The recommended path is to start here — and if you find yourself wanting more, move on to IFTTT or Raspberry Pi from there.

If this article was helpful, I'd love it if you shared it on X (Twitter).

App by the author of this blog

I made an iOS reading management app called My Bookstore. Simple bookshelf management — give it a try.

View on App Store →

References

Series articles

Note: This article is part of an automated blog update experiment using Claude Code.

No comments:

Post a Comment