Wednesday, April 29, 2026

SwitchBot × IFTTT: Automatically Turn On Your AC Before You Get Home [GPS Trigger Edition]

This article is for people who want their air conditioner to turn on automatically before they get home, or who want to link SwitchBot with external services. By combining IFTTT with SwitchBot, you can trigger your AC with things that the SwitchBot app alone can't handle — GPS location, weather conditions, time of day, and more.

3 approaches compared

There are three ways to accomplish the same thing. This article covers the IFTTT × SwitchBot integration approach.

(1) Raspberry Pi
+ cron
(2) SwitchBot
Automation
(3) IFTTT
Integration
(this article)
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 just want to use the app, check the SwitchBot Automation article. If you want to write complex logic, see the Raspberry Pi article (series list at the bottom).

What you can do with this

  • Link IFTTT with SwitchBot to control your AC
  • Set up GPS triggers like "turn AC on when I'm within 500m of home"
  • Use triggers outside the SwitchBot app — weather, time, and other services

What you need

  • SwitchBot Hub 2 (check on Amazon) — Hub series is required for IFTTT integration
  • IFTTT account (free plan works, but see the limitations below)
  • Smartphone (iOS or Android)

Note: the IFTTT free plan lets you have only 2 active applets. Using 3 or more requires a paid plan (Pro, starting at around ¥600/month).

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 IFTTT + SwitchBot integration

1. Create an IFTTT account

Sign up at the IFTTT website. Signing up with a Google account is the easiest path.

2. Connect the SwitchBot service

Search for "SwitchBot" in IFTTT → click "Connect" → log in with your SwitchBot account and authorize the connection.

3. Create an applet (example: turn AC on before arriving home)

"Create" → "If This" → "Location" → "You enter an area" — draw a circle around your home (500m radius or larger recommended). Then "Then That" → "SwitchBot" → "Control your device" — set the AC to turn ON.

4. Create an applet to turn the AC OFF

Create a separate rule for the OFF case: "You exit an area" or "when temperature drops," depending on your situation. This fills both slots of the IFTTT free plan's 2-applet limit.

GPS trigger accuracy

IFTTT's location trigger uses your smartphone's GPS, so accuracy is roughly 100–500m. Setting the radius to 500m or more reduces false triggers. There can also be a 1–5 minute response delay. If you're aiming for "AC on 15 minutes before I arrive," a 2–3km radius is more realistic.

Limitations of IFTTT integration

  • Free plan is limited to 2 applets (ON and OFF use both slots)
  • Only simple IF→THEN rules (AND/OR conditions require the Pro plan)
  • SwitchBot's IFTTT integration only works with the Hub series (Hub Mini and Hub 2 are supported; standalone sensors are not)
  • If IFTTT has an outage, nothing works — you're depending on two cloud services

Note: The steps in this article were verified as of April 2026, but library or hardware version changes may cause them to stop working as written. If something doesn't work, please let me know in the comments.

Wrap-up

IFTTT × SwitchBot makes it easy to automatically turn on your AC before you get home using GPS as a trigger. This is the approach to choose when you need external service integration that the SwitchBot app alone can't handle. Just be aware of the 2-applet limit on the free plan and the response latency going in.

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