Skip to content

How to Create a Home Assistant Amps Sensor in 2026 (The Definitive Guide)

30/01/2026

Last updated on January 30, 2026

Creating a Home Assistant amps sensor has become one of the single most valuable upgrades for any smart home’s energy management strategy. We’re not just talking about tracking watts anymore; understanding the current draw (in Amps) on your circuits is critical for ensuring safety, preventing overloads, and making smarter energy decisions. In this definitive 2026 guide, we’re leveling up the process with Home Assistant’s latest tools, moving beyond the classic Shelly EM to include popular Zigbee devices and other modern meters.

Why Real-Time Amp Monitoring is a Game-Changer in 2026

While energy management in Home Assistant has traditionally focused on power in Watts (W) and energy consumption in kilowatt-hours (kWh), monitoring amperage (A) provides an indispensable layer of safety and control. Think of amps as the real-time “pressure” on your electrical wiring.

Knowing this value lets you:

  • Prevent Circuit Overloads: Most residential circuits in the US are protected by 15A or 20A circuit breakers. Getting close to that limit is a recipe for a tripped breaker. An amps sensor can alert you *before* that happens, protecting your gear and preventing inconvenient outages.
  • Optimize High-Load Appliance Usage: With the rise of EV chargers, heat pumps, and other power-hungry appliances, knowing how many amps each one is pulling helps you manage simultaneous use without stressing your electrical system.
  • Diagnose Failing Appliances: A weird, sustained spike in the amperage of an appliance can be an early warning sign of a mechanical or electrical fault, letting you schedule a repair before a catastrophic failure.

Prerequisites: The Gear and Software You’ll Need

Before we dive into the YAML, let’s get our ducks in a row. The beauty of Home Assistant is its flexibility, allowing us to use a wide range of hardware.

Required Hardware

You’ll need a device that can measure, at a minimum, the power (W) and voltage (V) of the circuit you want to monitor. Here are my top recommendations for 2026:

  • Whole-Home Clamp Meters: This is the most accurate way to measure your entire home’s consumption right at the breaker panel.
    • Shelly EM: A tried-and-true classic. It reliably measures power, voltage, and power factor for up to two circuits. Perfect for your main service lines.
    • SONOFF POW Ring (or similar): A newer alternative that clamps directly around a wire in the panel, often simplifying installation.
  • Energy-Monitoring Smart Plugs: Ideal for monitoring a specific appliance or power strip.
    • Zigbee Plugs: My personal favorite due to their low power consumption and robust mesh networking. Models from brands like SONOFF or Tuya are excellent and integrate seamlessly with ZHA or, my preference, Zigbee2MQTT.
    • Wi-Fi Plugs: Devices like the TP-Link Tapo P110 or Meross MSS310 are solid alternatives if you prefer to stick with Wi-Fi.

Required Software

  1. An Up-to-Date Home Assistant: Make sure you’re running a recent version (2025.12 or newer). If you’re just starting out, here’s a great primer on what Home Assistant is and how to get started.
  2. File Editor Add-on: The “File editor” or “Visual Studio Code” add-on is essential for modifying your configuration files.
  3. The Right Integrations: You must have the corresponding integration (Shelly, ZHA, Zigbee2MQTT, Tuya, etc.) already set up and your energy meter successfully reporting data to Home Assistant.

Calculating Amps: The Formula and Power Factor

Most energy meters don’t provide an amperage entity out of the box. No problem—we can easily create one with a Home Assistant template sensor. The basic formula is derived from Ohm’s Law for AC circuits:

Current (A) = Power (W) / (Voltage (V) * Power Factor)

The Power Factor (PF) is the secret sauce for an accurate calculation. This value (between 0 and 1) measures how efficiently a device uses electricity. A purely resistive load (like a simple space heater) has a PF of 1, while motors or power supplies (inductive/capacitive loads) have a lower PF. If your meter doesn’t report power factor, you can use an estimated value (0.85 – 0.95 is a decent starting point for mixed household loads), but your accuracy will be slightly reduced.

Step-by-Step Guide: Creating Your Home Assistant Amps Sensor

Since late 2025, Home Assistant has been pushing the modern format for templates directly under the template: key in your configuration.yaml file. The old - platform: template format still works for now, but migrating is a smart move for future compatibility. If you’re new to templates, I highly recommend my guide on mastering YAML templates.

Open your configuration.yaml file and add the following block. I’ve included examples for a Shelly EM on a main breaker and a generic Zigbee plug.

# configuration.yaml

template:
  - sensor:
      # Example 1: Amps sensor for the main panel with a Shelly EM
      - name: "Main Panel Amps"
        unique_id: main_panel_amps_shelly_em
        unit_of_measurement: "A"
        icon: mdi:current-ac
        state_class: measurement
        # The formula to calculate amperage.
        state: >
          {% set power = states('sensor.shellyem_channel_1_power') | float(0) %}
          {% set voltage = states('sensor.shellyem_channel_1_voltage') | float(0) %}
          {% set power_factor = states('sensor.shellyem_channel_1_power_factor') | float(0.9) %}
          
          {# Avoid division by zero errors if sensors aren't ready at startup #}
          {% if voltage > 0 and power_factor > 0 %}
            {{ (power / (voltage * power_factor)) | round(2) }}
          {% else %}
            0
          {% endif %}
        # The sensor will only be available if its data sources are available.
        availability: >
          {{ states('sensor.shellyem_channel_1_power') | is_number and
             states('sensor.shellyem_channel_1_voltage') | is_number and
             states('sensor.shellyem_channel_1_power_factor') | is_number }}

      # Example 2: Amps sensor for a washing machine with a Zigbee plug (via Zigbee2MQTT)
      - name: "Washing Machine Amps"
        unique_id: washing_machine_amps_zigbee_plug
        unit_of_measurement: "A"
        icon: mdi:washing-machine
        state_class: measurement
        state: >
          {% set power = states('sensor.washing_machine_plug_power') | float(0) %}
          {% set voltage = states('sensor.washing_machine_plug_voltage') | float(120) %}
          
          {# If the plug doesn't report power factor, use a reasonable estimate (e.g., 0.90) #}
          {% set power_factor = 0.90 %}

          {% if voltage > 0 %}
            {{ (power / (voltage * power_factor)) | round(2) }}
          {% else %}
            0
          {% endif %}
        availability: >
          {{ states('sensor.washing_machine_plug_power') | is_number and
             states('sensor.washing_machine_plug_voltage') | is_number }}

Heads up: Remember to replace sensor.shellyem_channel_1_power and sensor.washing_machine_plug_power with the correct entity IDs from your own devices. You can find them under “Settings” > “Devices & Services” > “Entities”.

Dashboard Visualization and Practical Use Cases

Once you’ve saved your file and restarted Home Assistant, your new sensors will be ready to go. Now for the fun part—putting them to work!

Add the Sensor to Your Dashboard

You can easily visualize your new sensor. Head to your dashboard, click “Edit,” and add a “Gauge” card for a slick, real-time dial, or an “Entities” card to see the value alongside other related sensors.

Example Home Assistant dashboard showing a gauge card and history graph for an amps sensor.
A sample dashboard view with a gauge and history graph for our new amps sensor.

Powerful Automations

This is where the magic really happens. Here are a couple of automations I use in my own smart home.

1. Potential Overload Alert

This automation shoots me a notification if my total home’s current draw gets dangerously close to the main breaker’s limit (e.g., a 200A service), giving me time to shut something down before the power cuts out.

# automations.yaml
- alias: "Alert High Electrical Load"
  trigger:
    - platform: numeric_state
      entity_id: sensor.main_panel_amps
      above: 180  # Set a threshold just below your main breaker's rating
      for:
        minutes: 1
  action:
    - service: notify.mobile_app_my_phone
      data:
        title: "High Power Alert!"
        message: "Current draw is {{ states('sensor.main_panel_amps') }} A. Risk of tripping the main breaker."

You can learn how to set up powerful alerts like these in my guide to Home Assistant critical notifications.

2. Washer Cycle Finished Notification

By monitoring the washing machine’s smart plug, I can get an alert the moment the cycle finishes, so I don’t forget and leave wet clothes sitting in the drum.

# automations.yaml
- alias: "Notify when washer is done"
  trigger:
    # Triggers when the washer finishes and its current draw drops to near-zero
    - platform: numeric_state
      entity_id: sensor.washing_machine_amps
      below: 0.1
      for:
        minutes: 2
  condition:
    # This ensures it was actually running before it stopped (drew more than 1A)
    - condition: numeric_state
      entity_id: sensor.washing_machine_amps
      # This value should be the standby amps *before* the trigger fired
      below: 1 
  action:
    - service: notify.notify
      data:
        message: "The washing machine is done. Time to move the laundry!"

Troubleshooting and FAQs

My sensor shows as ‘Unavailable’. What’s wrong?

This usually happens for two reasons:

  1. Typo in an `entity_id`: Double- and triple-check that the source sensor names in your template (e.g., `sensor.shellyem_channel_1_power`) are an exact match for what’s in your Home Assistant. A single typo will cause the template to fail.
  2. Source sensors are unavailable: If your Shelly EM or Zigbee plug goes offline, its power and voltage sensors will become ‘unavailable,’ which in turn makes your template sensor unavailable. The availability: key we added helps manage this gracefully.

The amp values seem wrong or too low.

The usual suspect here is the power factor. If your device measures it, make sure you’re using that entity in your formula. If it doesn’t (like many smart plugs), try tweaking the hardcoded value in your template (e.g., from 0.90 to 0.85). Loads with motors (refrigerators, fans, pumps) often have a lower PF.

Can I create a sensor from an attribute instead of a separate entity?

Absolutely! Some devices report voltage or power factor as an attribute of the main power entity. The syntax is slightly different in that case. I cover this in detail in my complete guide to Home Assistant sensors.

Conclusion

Implementing a Home Assistant amps sensor has evolved from a niche enthusiast trick to an essential tool for any well-managed smart home in 2026. It not only gives you invaluable data for calculating current from watts and volts but also unlocks a new level of safety, automation, and insight into your home’s electrical health.

I hope this updated guide has helped you monitor your electrical consumption in Home Assistant like a pro. The small investment in a good energy meter and a few minutes in your YAML file will give you a degree of control and peace of mind that’s worth its weight in gold.