emporia-vue-v3.yaml
This configuration turns an Emporia Vue v3 energy monitor into a two-phase, 16-circuit power and energy sensor reporting directly to Home Assistant via the native API. Each phase leg (BLACK/RED) feeds the main voltage sensors, while the 16 CT clamp inputs each report per-circuit power, current, and daily energy use.
Before flashing this to your device:
- Update the
circuit_1-circuit_16substitutions to match the labels for your own breaker panel. - Verify each
phase_id/inputpairing against which phase leg and CT clamp input your wiring is actually connected to. - Re-calibrate the
calibrationvalues for your panel's actual voltage (see the inline formula comment). - Add
wifi_ssid,wifi_password,fallback_ap_password, andemporia_api_keyto your ownsecrets.yaml(not committed to source control). OTA updates reuse the sameemporia_api_key, so no separate OTA secret is needed. - Update the
manual_ipblock (gateway,static_ip,subnet,dns1,dns2) anduse_addressto match your own network's address range, or remove them to use DHCP instead. - The
external_componentssource is pinned to the@devbranch ofemporia-vue-local/esphome, which can change without notice. Consider pinning to a specific tag or commit instead for a reproducible build.
The Emporia Vue v3 also has a built-in 10/100Base-T Ethernet port. This example uses wifi: for connectivity; ESPHome does not support wifi: and ethernet: in the same configuration, so if you'd rather use the wired port, replace the wifi: block with an ethernet: block instead.
# Core ESPHome Node Configuration.
esphome:
name: ${name}
area: ${area}
friendly_name: ${friendly_name}
name_add_mac_suffix: false
substitutions:
name: emporiavue3
friendly_name: Emporia Vue V3
area: "Garage"
# Circuit Labels used for publishing to Home Assistant
circuit_1: "Bedroom Lighting" #"Breaker 14"
circuit_2: "Hotub and Grill" #"Breaker 6"
circuit_3: "Old Electric" #"Breaker 33"
circuit_4: "Countertop" #"Breaker 31"
circuit_5: "Stovetop" #"Breaker 19"
circuit_6: "Microwave" #"Breaker 25"
circuit_7: "Coffee Bar" #"Breaker 15"
circuit_8: "Fireplace" #"Breaker 26"
circuit_9: "Reynas Room" #"Breaker 12"
circuit_10: "Garage" #"Breaker 8"
circuit_11: "Living Room" #"Breaker 21"
circuit_12: "Washer" #"Breaker 39"
circuit_13: "Stove" #"Breaker 34/36"
circuit_14: "Oven" #"Breaker 38/40"
circuit_15: "AC Unit" #"Breaker 30/32"
circuit_16: "Dryer" #"Breaker 35/37"
# Icons for Home Assistant
icon_circuit: "mdi:power-plug"
icon_current: "mdi:current-ac"
icon_meter: "mdi:meter-electric"
icon_phase: "mdi:angle-acute"
icon_power: "mdi:transmission-tower-import"
icon_voltage: "mdi:transmission-tower"
icon_energy: "mdi:lightning-bolt"
external_components:
# - source: github://emporia-vue-local/esphome@vue3
- source: github://emporia-vue-local/esphome@dev
components:
- emporia_vue
esp32:
board: esp32dev
framework:
type: esp-idf
version: recommended
preferences:
# the default of 1min is far too short--flash chip is rated
# for approx 100k writes.
flash_write_interval: "48h"
# Enable Home Assistant API
api:
encryption:
# Generate your own with `esphome secrets` or the ESPHome dashboard.
key: !secret emporia_api_key
ota:
- platform: esphome
# Reuses the api.encryption.key above (recommended over ota password,
# which only authenticates uploads instead of encrypting the firmware image).
encryption:
# The logger component automatically logs all log messages
logger:
baud_rate: 0 # Disable the hardware UART logging
level: INFO # Minimum log level
logs:
component: ERROR # Silence warnings about execution/blocking time
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: Energy-Monitor Fallback Hotspot
password: !secret fallback_ap_password
on_connect:
- light.turn_on: wifi_led
on_disconnect:
- light.turn_off: wifi_led
# Static IP configuration for the primary wifi connection.
# Adjust to match your own network's address range.
manual_ip:
gateway: 192.168.11.1
static_ip: 192.168.11.190
subnet: 255.255.255.0
dns1: 1.1.1.1
dns2: 1.0.0.1
use_address: 192.168.11.190
# The captive portal component in ESPHome is a fallback mechanism used when connecting to WiFi fails.
captive_portal:
# Configure the two status LEDs on the Emporia Vue v3 case.
light:
- platform: status_led
id: wifi_led
pin:
number: 2
ignore_strapping_warning: true
restore_mode: ALWAYS_OFF
# Only driven if you switch to the ethernet: block noted above; add
# ethernet on_connect/on_disconnect triggers to turn this LED on/off.
- platform: status_led
id: ethernet_led
pin: 4
restore_mode: ALWAYS_OFF
#output:
# - platform: ledc
# pin: GPIO12
# id: buzzer
# - platform: gpio
# pin: GPIO27
# id: buzzer_gnd
#rtttl:
# output: buzzer
# on_finished_playback:
# - logger.log: 'Song ended!'
i2c:
# GPIO5 is a hardware strapping pin, but it's the fixed i2c bus wiring on
# the Emporia Vue v3's PCB, not something you can relocate in software.
# ESPHome will warn about it; this is expected and safe for this board.
sda: 5
scl: 18
scan: false
frequency: 200kHz # recommended range is 50-200kHz
id: i2c_a
# The restart button platform allows you to restart your node remotely through Home Assistant.
button:
- platform: restart
name: Restart
id: restart_button
icon: mdi:restart
- platform: safe_mode
name: Restart (Safe Mode)
id: safe_mode_button
icon: mdi:restart-alert
# - platform: template
# name: "Two Beeps"
# on_press:
# - rtttl.play: "two short:d=4,o=5,b=100:16e6,16e6"
# This is used for the daily energy use calculation.
time:
- platform: sntp
# Set to your own time zone so the daily energy sensors reset at local midnight
timezone: America/New_York
# these are called references in YAML. They allow you to reuse
# this configuration in each sensor, while only defining it once
.defaultfilters:
- &moving_avg
# we capture a new sample every 0.24 seconds, so the time can
# be calculated from the number of samples as n * 0.24.
sliding_window_moving_average:
# we average over the past 2.88 seconds
window_size: 24
# we push a new value every 1.44 seconds
send_every: 12
- &invert
# invert and filter out any values below 0.
lambda: 'return max(-x, 0.0f);'
- &pos
# filter out any values below 0.
lambda: 'return max(x, 0.0f);'
- &abs
# take the absolute value of the value
lambda: 'return abs(x);'
sensor:
- platform: emporia_vue
variant: vue3
i2c_id: i2c_a
phases:
- id: phase_a # Verify that this specific phase/leg is connected to correct input wire color on device listed below
input: BLACK # Vue device wire color
calibration: 0.0194 # 0.022 is used as the default as starting point but may need adjusted to ensure accuracy
# To calculate new calibration value use the formula <in-use calibration value> * <accurate voltage> / <reporting voltage>
voltage:
name: "Phase L1 Voltage"
filters: [*moving_avg, *pos]
icon: $icon_voltage
- id: phase_b # Verify that this specific phase/leg is connected to correct input wire color on device listed below
input: RED # Vue device wire color
calibration: 0.0194 # 0.022 is used as the default as starting point but may need adjusted to ensure accuracy
# To calculate new calibration value use the formula <in-use calibration value> * <accurate voltage> / <reporting voltage>
voltage:
name: "Phase L2 Voltage"
filters: [*moving_avg, *pos]
icon: $icon_voltage
ct_clamps:
- phase_id: phase_a
input: "A" # Verify the CT going to this device input also matches the phase/leg
power:
name: "Phase L1 Power"
id: phase_a_power
device_class: power
filters: [*moving_avg, *pos]
icon: $icon_power
current:
name: "Phase L1 Current"
filters: [*moving_avg, *pos]
icon: $icon_current
- phase_id: phase_b
input: "C" # Verify the CT going to this device input also matches the phase/leg
power:
name: "Phase L2 Power"
id: phase_b_power
device_class: power
filters: [*moving_avg, *pos]
icon: $icon_power
current:
name: "Phase L2 Current"
filters: [*moving_avg, *pos]
icon: $icon_current
# Power Monitor
# Pay close attention to set the phase_id for each breaker by matching it to the phase/leg it connects to in the panel
- { phase_id: phase_b, input: "1", power: { name: "${circuit_1} Power", id: cir1, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos ] }, current: { name: "${circuit_1} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_a, input: "2", power: { name: "${circuit_2} Power", id: cir2, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos ] }, current: { name: "${circuit_2} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_b, input: "3", power: { name: "${circuit_3} Power", id: cir3, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos ] }, current: { name: "${circuit_3} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_a, input: "4", power: { name: "${circuit_4} Power", id: cir4, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos ] }, current: { name: "${circuit_4} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_b, input: "5", power: { name: "${circuit_5} Power", id: cir5, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos ] }, current: { name: "${circuit_5} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_a, input: "6", power: { name: "${circuit_6} Power", id: cir6, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos ] }, current: { name: "${circuit_6} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_b, input: "7", power: { name: "${circuit_7} Power", id: cir7, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos ] }, current: { name: "${circuit_7} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_a, input: "8", power: { name: "${circuit_8} Power", id: cir8, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos ] }, current: { name: "${circuit_8} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_b, input: "9", power: { name: "${circuit_9} Power", id: cir9, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos ] }, current: { name: "${circuit_9} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_a, input: "10", power: { name: "${circuit_10} Power", id: cir10, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos ] }, current: { name: "${circuit_10} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_b, input: "11", power: { name: "${circuit_11} Power", id: cir11, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos ] }, current: { name: "${circuit_11} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
# NOTE: Circuit 12 intentionally omits the *invert filter used by every other circuit below.
# Verify this is correct for your panel (e.g. CT clamp installed in the opposite orientation)
# before relying on this sensor's sign.
- { phase_id: phase_b, input: "12", power: { name: "${circuit_12} Power", id: cir12, icon: $icon_circuit, filters: [ *moving_avg, *pos ] }, current: { name: "${circuit_12} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
# Circuits 13-16 are 240V/double-pole breakers (Stove, Oven, A/C, Dryer). A single CT
# measures the current on one leg: double power to account for both legs, but leave current
# unchanged because the same current flows through both poles of a 240V load.
- { phase_id: phase_a, input: "13", power: { name: "${circuit_13} Power", id: cir13, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos, multiply: 2 ] }, current: { name: "${circuit_13} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_a, input: "14", power: { name: "${circuit_14} Power", id: cir14, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos, multiply: 2 ] }, current: { name: "${circuit_14} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_a, input: "15", power: { name: "${circuit_15} Power", id: cir15, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos, multiply: 2 ] }, current: { name: "${circuit_15} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- { phase_id: phase_a, input: "16", power: { name: "${circuit_16} Power", id: cir16, icon: $icon_circuit, filters: [ *invert, *moving_avg, *pos, multiply: 2 ] }, current: { name: "${circuit_16} Current", icon: $icon_current, filters: [ *moving_avg, *pos]} }
- platform: template
name: "Total Power"
lambda: return id(phase_a_power).state + id(phase_b_power).state;
update_interval: 10s
id: total_power
unit_of_measurement: "W"
- platform: total_daily_energy
name: "Total Daily Energy"
power_id: total_power
accuracy_decimals: 0
- { power_id: cir1, platform: total_daily_energy, accuracy_decimals: 0, icon: $icon_energy, name: "${circuit_1} Daily Energy" }
- { power_id: cir2, platform: total_daily_energy, accuracy_decimals: 0, icon: $icon_energy, name: "${circuit_2} Daily Energy" }
- { power_id: cir3, platform: total_daily_energy, accuracy_decimals: 0, icon: $icon_energy, name: "${circuit_3} Daily Energy" }
- { power_id: cir4, platform: total_daily_energy, accuracy_decimals: 0, icon: $icon_energy, name: "${circuit_4} Daily Energy" }
- { power_id: cir5, platform: total_daily_energy, accuracy_decimals: 0, icon: $icon_energy, name: "${circuit_5} Daily Energy" }
- { power_id: cir6, platform: total_daily_energy, accuracy_decimals: 0, icon: $icon_energy, name: "${circuit_6} Daily Energy" }
- { power_id: cir7, platform: total_daily_energy, accuracy_decimals: 0, icon: $icon_energy, name: "${circuit_7} Daily Energy" }
- { power_id: cir8, platform: total_daily_energy, accuracy_decimals: 0, icon: $icon_energy, name: "${circuit_8} Daily Energy" }
- { power_id: cir9, platform: total_daily_energy, accuracy_decimals: 0, icon: $icon_energy, name: "${circuit_9} Daily Energy" }
- { power_id: cir10, platform: total_daily_energy, accuracy_decimals: 0, icon: $icon_energy, name: "${circuit_10} Daily Energy" }
- { power_id: cir11, platform: total_daily_energy, accuracy_decimals: 0, icon: $icon_energy, name: "${circuit_11} Daily Energy" }
- { power_id: cir12, platform: total_daily_energy, accuracy_decimals: 0, icon: $icon_energy, name: "${circuit_12} Daily Energy" }
# Circuits 13-16 (the 240V/double-pole breakers) intentionally omit daily energy sensors below;
# remove the comments to enable them if you want daily totals for those circuits too.
# - { power_id: cir13, platform: total_daily_energy, accuracy_decimals: 0, name: "${circuit_13} Daily Energy" }
# - { power_id: cir14, platform: total_daily_energy, accuracy_decimals: 0, name: "${circuit_14} Daily Energy" }
# - { power_id: cir15, platform: total_daily_energy, accuracy_decimals: 0, name: "${circuit_15} Daily Energy" }
# - { power_id: cir16, platform: total_daily_energy, accuracy_decimals: 0, name: "${circuit_16} Daily Energy" }
# Diagnostic sensors to help remotely troubleshoot connectivity and node health.
- platform: wifi_signal
name: "WiFi Signal"
update_interval: 60s
- platform: uptime
name: "Uptime"
# Provide diagnostic information about the platform.
text_sensor:
- platform: wifi_info
ip_address:
name: "IP Address"
ssid:
name: "Connected SSID"
disabled_by_default: true
mac_address:
name: "MAC Address"
disabled_by_default: true
Voltage Works but Power or Current Is Zero
Keep variant: vue3 under platform: emporia_vue. The external component defaults to Vue 2, which reverses the A/C main CT port mapping compared with Vue 3. Valid voltage readings do not confirm that the CT mapping is correct. Rebuild and upload the firmware after changing this setting.
If power still reads zero while a known load is running, temporarily use filters: [*moving_avg] on the affected power sensor. The *pos filter clamps negative readings to zero, and *invert clamps positive input readings to zero after reversing their sign. A negative reading without these filters points to CT orientation or a mismatched phase_id; verify the phase assignment before choosing the sign filter. Do not use absolute values to hide a phase mismatch or legitimate exported power.
The main CT entries explicitly define current: sensors to publish amps. If current also stays at zero under load, verify that the configured input matches the connected CT port. Have a qualified electrician check clamp installation and wiring; do not work inside an energized panel.
💬 Recent Comments