Edit esp-mainpowermonitor.yaml
This commit is contained in:
@@ -6,6 +6,11 @@
|
|||||||
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-mainpowermonitor.yaml
|
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-mainpowermonitor.yaml
|
||||||
#:########################################################################################:#
|
#:########################################################################################:#
|
||||||
# VERSIONS:
|
# VERSIONS:
|
||||||
|
# v1.4 2026-07-12 Added Home Assistant Energy Dashboard metadata.
|
||||||
|
# Marked cumulative PZEM, mains total, and 32A Wallcharger total energy
|
||||||
|
# sensors as energy / total_increasing.
|
||||||
|
# Marked mains and EV power sensors as power / measurement.
|
||||||
|
# Added single-process compilation limit to reduce Builder memory use.
|
||||||
# v1.3 2026-02-25 Updated yaml to zorruno layout V1.1
|
# v1.3 2026-02-25 Updated yaml to zorruno layout V1.1
|
||||||
# v1.2 2026-02-25 Updated yaml to zorruno layout V1.1. Added EV charging binary sensor
|
# v1.2 2026-02-25 Updated yaml to zorruno layout V1.1. Added EV charging binary sensor
|
||||||
# and EV power rolling average (default 5 min). Clarified EV pulse notes.
|
# and EV power rolling average (default 5 min). Clarified EV pulse notes.
|
||||||
@@ -21,6 +26,11 @@
|
|||||||
# OPERATION NOTES:
|
# OPERATION NOTES:
|
||||||
# - Power Monitor using 3x PZEM-004T V3 (Modbus) for 3-phase monitoring
|
# - Power Monitor using 3x PZEM-004T V3 (Modbus) for 3-phase monitoring
|
||||||
# - Pulse input energy monitoring for 32A EV Charger (2 Wh per pulse)
|
# - Pulse input energy monitoring for 32A EV Charger (2 Wh per pulse)
|
||||||
|
# - 32A Wallcharger Total Energy is cumulative pulse-derived energy in kWh
|
||||||
|
# - Cumulative active-energy sensors are exposed to Home Assistant with:
|
||||||
|
# device_class: energy
|
||||||
|
# state_class: total_increasing
|
||||||
|
# - This allows the cumulative totals to be selected in the HA Energy Dashboard
|
||||||
# - Adds a 5 minute rolling average for EV power to avoid spiky readings at low loads
|
# - Adds a 5 minute rolling average for EV power to avoid spiky readings at low loads
|
||||||
# - Adds a binary sensor to indicate when the EV charger is operating (threshold configurable)
|
# - Adds a binary sensor to indicate when the EV charger is operating (threshold configurable)
|
||||||
#
|
#
|
||||||
@@ -60,7 +70,7 @@ substitutions:
|
|||||||
|
|
||||||
# Project Naming
|
# Project Naming
|
||||||
project_name: "Wemos.D1Mini PZEM-004T V3 3-Phase Power Monitor"
|
project_name: "Wemos.D1Mini PZEM-004T V3 3-Phase Power Monitor"
|
||||||
project_version: "v1.3"
|
project_version: "v1.4"
|
||||||
|
|
||||||
# Passwords
|
# Passwords
|
||||||
api_key: !secret esp-api_key
|
api_key: !secret esp-api_key
|
||||||
@@ -202,6 +212,10 @@ esphome:
|
|||||||
friendly_name: "${friendly_name}"
|
friendly_name: "${friendly_name}"
|
||||||
comment: "${description_comment}"
|
comment: "${description_comment}"
|
||||||
area: "${device_area}"
|
area: "${device_area}"
|
||||||
|
|
||||||
|
# Restrict PlatformIO to one simultaneous compiler process to reduce host RAM use.
|
||||||
|
compile_process_limit: 1
|
||||||
|
|
||||||
project:
|
project:
|
||||||
name: "${project_name}"
|
name: "${project_name}"
|
||||||
version: "${project_version}"
|
version: "${project_version}"
|
||||||
@@ -467,11 +481,16 @@ sensor:
|
|||||||
power:
|
power:
|
||||||
name: "${pzem_red_p_name}"
|
name: "${pzem_red_p_name}"
|
||||||
id: pzem_red_power_w
|
id: pzem_red_power_w
|
||||||
|
unit_of_measurement: "W"
|
||||||
|
device_class: power
|
||||||
|
state_class: measurement
|
||||||
accuracy_decimals: 0
|
accuracy_decimals: 0
|
||||||
energy:
|
energy:
|
||||||
name: "${pzem_red_e_name}"
|
name: "${pzem_red_e_name}"
|
||||||
id: pzem_red_energy_kwh
|
id: pzem_red_energy_kwh
|
||||||
unit_of_measurement: "kWh"
|
unit_of_measurement: "kWh"
|
||||||
|
device_class: energy
|
||||||
|
state_class: total_increasing
|
||||||
accuracy_decimals: 3
|
accuracy_decimals: 3
|
||||||
filters:
|
filters:
|
||||||
- multiply: 0.001
|
- multiply: 0.001
|
||||||
@@ -537,11 +556,16 @@ sensor:
|
|||||||
power:
|
power:
|
||||||
name: "${pzem_yellow_p_name}"
|
name: "${pzem_yellow_p_name}"
|
||||||
id: pzem_yellow_power_w
|
id: pzem_yellow_power_w
|
||||||
|
unit_of_measurement: "W"
|
||||||
|
device_class: power
|
||||||
|
state_class: measurement
|
||||||
accuracy_decimals: 0
|
accuracy_decimals: 0
|
||||||
energy:
|
energy:
|
||||||
name: "${pzem_yellow_e_name}"
|
name: "${pzem_yellow_e_name}"
|
||||||
id: pzem_yellow_energy_kwh
|
id: pzem_yellow_energy_kwh
|
||||||
unit_of_measurement: "kWh"
|
unit_of_measurement: "kWh"
|
||||||
|
device_class: energy
|
||||||
|
state_class: total_increasing
|
||||||
accuracy_decimals: 3
|
accuracy_decimals: 3
|
||||||
filters:
|
filters:
|
||||||
- multiply: 0.001
|
- multiply: 0.001
|
||||||
@@ -607,11 +631,16 @@ sensor:
|
|||||||
power:
|
power:
|
||||||
name: "${pzem_blue_p_name}"
|
name: "${pzem_blue_p_name}"
|
||||||
id: pzem_blue_power_w
|
id: pzem_blue_power_w
|
||||||
|
unit_of_measurement: "W"
|
||||||
|
device_class: power
|
||||||
|
state_class: measurement
|
||||||
accuracy_decimals: 0
|
accuracy_decimals: 0
|
||||||
energy:
|
energy:
|
||||||
name: "${pzem_blue_e_name}"
|
name: "${pzem_blue_e_name}"
|
||||||
id: pzem_blue_energy_kwh
|
id: pzem_blue_energy_kwh
|
||||||
unit_of_measurement: "kWh"
|
unit_of_measurement: "kWh"
|
||||||
|
device_class: energy
|
||||||
|
state_class: total_increasing
|
||||||
accuracy_decimals: 3
|
accuracy_decimals: 3
|
||||||
filters:
|
filters:
|
||||||
- multiply: 0.001
|
- multiply: 0.001
|
||||||
@@ -665,6 +694,8 @@ sensor:
|
|||||||
name: "${mains_total_p_name}"
|
name: "${mains_total_p_name}"
|
||||||
id: mains_total_active_power_w
|
id: mains_total_active_power_w
|
||||||
unit_of_measurement: "W"
|
unit_of_measurement: "W"
|
||||||
|
device_class: power
|
||||||
|
state_class: measurement
|
||||||
accuracy_decimals: 0
|
accuracy_decimals: 0
|
||||||
update_interval: ${pzem_update_interval}
|
update_interval: ${pzem_update_interval}
|
||||||
lambda: |-
|
lambda: |-
|
||||||
@@ -711,6 +742,8 @@ sensor:
|
|||||||
name: "${mains_total_e_name}"
|
name: "${mains_total_e_name}"
|
||||||
id: mains_total_active_energy_kwh
|
id: mains_total_active_energy_kwh
|
||||||
unit_of_measurement: "kWh"
|
unit_of_measurement: "kWh"
|
||||||
|
device_class: energy
|
||||||
|
state_class: total_increasing
|
||||||
accuracy_decimals: 3
|
accuracy_decimals: 3
|
||||||
update_interval: ${pzem_update_interval}
|
update_interval: ${pzem_update_interval}
|
||||||
lambda: |-
|
lambda: |-
|
||||||
@@ -957,6 +990,8 @@ sensor:
|
|||||||
name: "${ev_power_name}"
|
name: "${ev_power_name}"
|
||||||
id: ev_power_avg_w
|
id: ev_power_avg_w
|
||||||
unit_of_measurement: "W"
|
unit_of_measurement: "W"
|
||||||
|
device_class: power
|
||||||
|
state_class: measurement
|
||||||
accuracy_decimals: 0
|
accuracy_decimals: 0
|
||||||
update_interval: "${ev_power_avg_sample_interval}"
|
update_interval: "${ev_power_avg_sample_interval}"
|
||||||
lambda: |-
|
lambda: |-
|
||||||
@@ -966,6 +1001,8 @@ sensor:
|
|||||||
name: "${ev_total_energy_name}"
|
name: "${ev_total_energy_name}"
|
||||||
id: ev_total_energy_kwh
|
id: ev_total_energy_kwh
|
||||||
unit_of_measurement: "kWh"
|
unit_of_measurement: "kWh"
|
||||||
|
device_class: energy
|
||||||
|
state_class: total_increasing
|
||||||
accuracy_decimals: 3
|
accuracy_decimals: 3
|
||||||
update_interval: 10s
|
update_interval: 10s
|
||||||
lambda: |-
|
lambda: |-
|
||||||
|
|||||||
Reference in New Issue
Block a user