Home Assistant Tasmota: Take Back Control of Your Smart Devices

That $12 smart plug you bought? It sends your data to a server in China and stops working if the company shuts down. Tasmota fixes that. Flash open-source firmware onto your Wi-Fi devices and they talk directly to Home Assistant. Local, fast, private, and yours forever.

Check Your Devices MQTT Guide

What Is Tasmota?

Tasmota is open-source firmware created by Theo Arends that replaces the stock firmware on thousands of Wi-Fi smart devices. Instead of your smart plug phoning home to some cloud server, it talks directly to Home Assistant over your local network. The result? Faster response times, complete privacy, and devices that work even when your internet is down.

๐Ÿ”’

100% Local

No cloud, no accounts, no data leaving your home. Everything stays on your network.

โšก

Instant Response

No round-trip to the cloud means sub-second response times for switches and automations.

๐Ÿ›ก๏ธ

No Shutdowns

When Tuya or SmartLife kill their servers, your devices keep working. You own the firmware.

๐Ÿ’ฐ

Dirt Cheap

Flash a $8 Sonoff Basic and you have a local smart relay. Try doing that with commercial gear.

Tasmota vs ESPHome: When to Use Which

Both are excellent open-source firmware options for ESP-based devices. But they solve different problems. Here is the honest comparison.

Choose Tasmota when...

  • Flashing commercial off-the-shelf devices (plugs, switches, bulbs)
  • You want a built-in web UI for device control without HA
  • Running standalone devices with timers and rules
  • You prefer configuring through a web interface
  • Using devices that already have Tasmota templates

Choose ESPHome when...

  • Building custom devices from bare ESP32 boards
  • You want the tightest possible HA integration (native API)
  • Creating sensor projects with specific wiring
  • You prefer YAML-based configuration
  • Building Bluetooth proxies or voice satellites

The real answer? Most Home Assistant power users run both. Tasmota on their commercial devices (smart plugs, switches, bulbs) and ESPHome on their custom sensor projects. They are not competitors; they are complementary tools.

Best Devices to Flash with Tasmota

Not every device is worth the effort. These are the proven choices that the community has been using for years, sorted by how easy they are to flash.

Pre-flashed (zero effort)

Athom Smart Plug (EU/US/UK)

Ships with Tasmota already installed. Plug in, configure Wi-Fi, done. Energy monitoring included.

~$10

Athom Light Bulb (E27/E14)

RGBCW bulbs with Tasmota pre-installed. Available in warm white, cool white, and color variants.

~$8

Athom Mini Relay / Switch Module

Tiny relay boards for behind-the-switch installations. Tasmota ready out of the box.

~$7

OTA flashable (no soldering)

Sonoff Basic R2 / Mini R2

The classic Tasmota device. Flash via the Tasmota web installer at tasmota.github.io/install. Supports DIY mode for easy OTA.

~$5-8

Sonoff S31 / S26 Smart Plug

Smart plugs with energy monitoring (S31). Well-documented flashing process with serial header access.

~$10-15

Sonoff TH16 / TH Elite

Temperature and humidity monitoring relay. Great for controlling heaters or fans based on sensor readings.

~$12-18

Serial flash required (basic soldering)

Tuya / SmartLife devices (older models)

Many older Tuya devices use ESP8266 chips. Newer ones have switched to non-ESP chips that do not support Tasmota. Check the chip before buying.

$5-20

BlitzWolf Smart Plugs

Decent energy monitoring plugs that need serial flashing. Popular in the EU market. Models with BW-SHP prefix are well-documented.

~$12

Important note about newer Tuya devices: Since 2022, many Tuya manufacturers have switched from ESP8266 chips to non-flashable alternatives (like Beken BK7231 or Realtek RTL8720). Always verify the chip inside before buying a device specifically to flash with Tasmota. The Tasmota Device Templates Repository is your best friend here.

How to Flash Tasmota

Three methods, from easiest to most involved. Start with Method 1 and only go deeper if your device requires it.

1

Tasmota Web Installer (easiest)

Works with Chrome or Edge. Plug your device into USB, visit tasmota.github.io/install, select your device, and click Install. The browser flashes the firmware directly. Takes about 2 minutes.

Works for: Any ESP device connected via USB. Sonoff devices with exposed headers, NodeMCU boards, ESP32 dev boards.

2

Sonoff DIY Mode (over Wi-Fi)

Newer Sonoff devices support DIY mode. You enable it through the eWeLink app, then flash Tasmota over Wi-Fi without opening the device. The catch: not all Sonoff models support this, and the process can be finicky.

Steps: Enable DIY mode in eWeLink > Connect device to your network > Use the Tasmota web installer or a tool like SonOTA > Device reboots with Tasmota.

3

Serial Flashing (USB-to-serial adapter)

The universal method that works on any ESP device. You open the case, connect 4 wires (3.3V, GND, TX, RX) from a USB-to-serial adapter to the chip, put it in flash mode, and upload Tasmota. Sounds scary, but it is straightforward once you have done it.

What you need:

  • USB-to-serial adapter (FTDI or CH340G, ~$3 on AliExpress)
  • Dupont jumper wires
  • Soldering iron (for devices without pin headers)

Connecting Tasmota to Home Assistant

Two ways to get your Tasmota devices into Home Assistant. Both work great, but the native integration is now the recommended approach.

Recommended

Native Tasmota Integration

Home Assistant has a built-in Tasmota integration that auto-discovers devices. It still uses MQTT under the hood, but handles the configuration automatically.

Setup steps:

  1. Install the Mosquitto MQTT broker add-on
  2. In your Tasmota device console, set:
    SetOption19 0
  3. Enable Tasmota discovery:
    SetOption114 1
  4. Go to HA Settings > Integrations > Add "Tasmota"
  5. Devices appear automatically

MQTT Auto-Discovery

The older method using generic MQTT auto-discovery. Still works, but the native integration gives you better entity naming and device grouping.

Setup steps:

  1. Install the Mosquitto MQTT broker
  2. In Tasmota console:
    SetOption19 1
  3. Configure MQTT host/user/password in Tasmota web UI
  4. Devices show up under the MQTT integration

Essential Tasmota Console Commands

# Configure MQTT broker

MqttHost 192.168.1.100

MqttUser homeassistant

MqttPassword your_password

# Enable native Tasmota integration (recommended)

SetOption19 0

SetOption114 1

# Set device name and friendly name

DeviceName Kitchen Plug

FriendlyName1 Kitchen Coffee Maker

# Enable power monitoring (if supported)

PowerDelta1 10

TelePeriod 60

5 Tasmota Automations You Should Build First

Once your Tasmota devices are in Home Assistant, the real fun begins. Here are practical automations that people actually use every day.

1. Auto-off for Forgotten Appliances

Use a Tasmota smart plug with energy monitoring to detect when an appliance (iron, curling iron, space heater) has been on too long. Turn it off automatically and send a notification.

automation:

trigger:

- platform: state

entity_id: switch.iron_plug

to: "on"

for: "01:00:00"

action:

- service: switch.turn_off

target:

entity_id: switch.iron_plug

- service: notify.mobile_app

data:

message: "Iron was on for over an hour. Turned it off."

2. Washing Machine Done Notification

A Tasmota plug with energy monitoring detects when your washing machine draws less than 5W (meaning the cycle is finished). No more forgetting wet laundry in the machine.

automation:

trigger:

- platform: numeric_state

entity_id: sensor.washing_machine_power

below: 5

for: "00:03:00"

condition:

- condition: state

entity_id: switch.washing_machine_plug

state: "on"

action:

- service: notify.mobile_app

data:

message: "Washing machine is done! Time to move the laundry."

3. Smart Light Switch with Tasmota Relay

Wire a Sonoff Mini behind your existing light switch. The physical switch still works (toggle mode), but now you can also control the light from your phone, voice, or automations.

automation:

trigger:

- platform: sun

event: sunset

offset: "-00:30:00"

action:

- service: switch.turn_on

target:

entity_id: switch.porch_light_relay

4. Energy Cost Tracker per Appliance

Tasmota plugs with energy monitoring report real-time wattage and total kWh. Combine that with the HA energy dashboard to track exactly how much each appliance costs you per month.

# In Tasmota console, set reporting interval

TelePeriod 60

PowerDelta1 10

# Then in HA, add the device to

# Settings > Dashboards > Energy

5. Christmas Lights on a Schedule (with Override)

A Tasmota outdoor plug controls your holiday lights. They turn on at sunset, off at 11 PM, but you can override from your phone when you have guests over. Even works when your internet is down because everything is local.

automation:

- trigger:

platform: sun

event: sunset

action:

service: switch.turn_on

target:

entity_id: switch.outdoor_lights

- trigger:

platform: time

at: "23:00:00"

action:

service: switch.turn_off

target:

entity_id: switch.outdoor_lights

Want more automation ideas? Check out our 30 best Home Assistant automations guide.

Tasmota Rules: Device-Level Automations

One of Tasmota's killer features is rules: automations that run directly on the device, even without Home Assistant. This means your critical automations keep working no matter what.

Auto-restart on power loss

Make your device remember its state and turn back on after a power outage:

PowerOnState 1

Temperature-based relay control

On a Sonoff TH with a temperature sensor, turn a fan on above 28C and off below 25C. Runs entirely on the device:

Rule1

ON AM2301#Temperature>28 DO Power1 1 ENDON

ON AM2301#Temperature<25 DO Power1 0 ENDON

Rule1 1

Auto-off timer

Automatically turn off after 30 minutes, no matter what turns it on:

Rule1 ON Power1#state=1 DO RuleTimer1 1800 ENDON

ON Rules#Timer=1 DO Power1 0 ENDON

Rule1 1

Tasmota Pro Tips

๐Ÿ”„

Keep firmware updated

Tasmota updates are easy. Just go to the device web UI > Firmware Upgrade > Start Upgrade. It pulls the latest version over the air. Do this every few months for security patches and new features.

๐Ÿ“‹

Apply templates from blakadder.com

After flashing, your device needs a "template" that tells Tasmota which GPIO pins do what. Search your device model at templates.blakadder.com, copy the template, paste it into the Tasmota console. One command and your device works perfectly.

๐Ÿ“ก

Use a dedicated IoT VLAN

Put your Tasmota devices on a separate Wi-Fi network (VLAN) with no internet access. They only need to reach your MQTT broker on the local network. This is the gold standard for smart home security.

๐Ÿ’พ

Backup your device config

Before any firmware update, go to Configuration > Backup Configuration in the Tasmota web UI. Download the .dmp file. If anything goes wrong, you can restore your entire setup in seconds.

โšก

Consider Athom pre-flashed devices

If you do not want to flash devices yourself, Athom sells plugs, bulbs, and relay modules with Tasmota pre-installed. Slightly more expensive, but zero hassle. Available on AliExpress and their own store.

Get Started This Weekend

Here is a realistic weekend plan to go from zero to Tasmota-powered smart home.

1

Order an Athom pre-flashed smart plug (~$10)

Skip the flashing for your first device. Get it working, understand the concepts, then graduate to flashing your own later.

2

Set up Mosquitto MQTT broker in Home Assistant

Install it as an add-on, create a user, done. Takes 5 minutes.

3

Connect the plug, configure MQTT, add to HA

Power on the plug, connect to its Wi-Fi hotspot, set your network credentials, configure MQTT. Enable the Tasmota integration in HA.

4

Build your first automation

Start with the washing machine notification or auto-off timer. Something practical that makes your life better immediately.

5

Explore and expand

Add the plug to your energy dashboard. Try flashing a Sonoff Basic yourself. Check out more smart plug options.

Not sure if your current devices work with Home Assistant?

Run a Free Device Scan