How to Use a Smart Plug with Home Assistant – A Complete Guide

Looking to enhance your home automation setup? Learn how to integrate and automate a smart plug with Home Assistant for seamless control of your devices. This guide covers setup, automation examples, and energy savings tips.

TUTORIAIS

3/13/20252 min read

What Is a Smart Plug?

A smart plug is a versatile device that allows you to control home appliances remotely, monitor energy usage, and create automated routines. By integrating it with Home Assistant, you can increase your home’s efficiency and automation potential.

Step 1: Choosing the Right Smart Plug

For this guide, we'll use the TNCE Tuya Smart Plug (available on AliExpress), which is Wi-Fi compatible and easily integrates with Home Assistant.

Step 2: Setting Up the Smart Plug
Connect to the Official App

Before integrating with Home Assistant, you need to set up the smart plug with its official app (like Tuya Smart or Smart Life):

  1. Install the "Smart Life" or "Tuya Smart" app on your phone.

  2. Plug the device in and hold the pairing button until the LED blinks.

  3. Follow the app instructions to connect the plug to your Wi-Fi.

Integrate with Home Assistant
  1. In Home Assistant, go to Settings > Devices & Services.

  2. Click Add Integration, then search for "Tuya" (or your compatible integration).

  3. Log in with the same credentials used in the app.

  4. Once authenticated, your smart plug will appear as a device.

Practical Use Cases for Smart Plugs in Home Assistant

1. Automated Lighting Control

Control lamps or lights based on time or conditions:

  • Example: Turn lights on at sunset and off at sunrise.

    YAML Automation:

2. Scheduled Charging

Avoid overcharging and save energy by scheduling charging times:

  • Example: Charge your phone from 10:00 PM to 11:00 PM.

    YAML Automation:

3. Automate Your Coffee Maker

Set your coffee maker to brew before you wake up:

  • Example: Turn on the coffee maker at 6:00 AM.

4. Simulate Presence

Simulate your presence at home by turning devices on and off:

  • Example: Randomly activate lights between 7:00 PM and 10:00 PM.

    YAML Automation:

5. Energy Monitoring

Monitor devices with energy consumption sensors and set up alerts for high usage:

  • Example: Get a notification when a device consumes over 100W.

    YAML Automation:

Conclusion

Integrating a smart plug with Home Assistant expands your automation capabilities, making your home more convenient, secure, and energy-efficient. These automation examples allow you to optimize your routines, save energy, and increase comfort in your daily life.

Products Used in This Guide