Hello…
Thx to you guys here in the forum i was able to get my emporia vue working on esphome…
Now i found out that it does almost all correct, but it does not calculate the daily usage correct.
So i created a couple template integration sensors to group double breakers (shown as first code sample below) and now wanted to add all the usages of all my breakers to a daily sum for the energy panel (also shown as second sample below).
So all the sensors are setup the same…wh, device lass energy, state class total increasing…and all sensors but the all in one sum are resetting on day break as needed…
does anyone see/know why the total sum one is not breaking to 0 at day change?
- sensor:
- name: "WH Dryer double breaker 240v"
unit_of_measurement: "Wh"
device_class: energy
state_class: total_increasing
state: "{{ (states('sensor.energymonitor1_circuit_4_daily_energy_2') | float + states('sensor.energymonitor1_circuit_5_daily_energy_2') | float) | round(2) }}"
availability: "{{ has_value('sensor.energymonitor1_circuit_4_daily_energy_2') and has_value('sensor.energymonitor1_circuit_5_daily_energy_2') }}"
- sensor:
- name: "WH Total house usage 240v"
unit_of_measurement: "Wh"
device_class: energy
state_class: total_increasing
state: "{{ (states('sensor.energymonitor1_circuit_1_daily_energy_2') | float + states('sensor.energymonitor1_circuit_6_daily_energy_2') | float + states('sensor.energymonitor1_circuit_7_daily_energy_2') | float + states('sensor.energymonitor1_circuit_8_daily_energy_2') | float + states('sensor.energymonitor1_circuit_9_daily_energy_2') | float + states('sensor.energymonitor1_circuit_10_daily_energy_2') | float + states('sensor.energymonitor1_circuit_11_daily_energy_2') | float + states('sensor.energymonitor1_circuit_12_daily_energy_2') | float + states('sensor.energymonitor2_circuit_1_daily_energy') | float + states('sensor.energymonitor2_circuit_2_daily_energy') | float + states('sensor.energymonitor2_circuit_3_daily_energy') | float + states('sensor.energymonitor2_circuit_4_daily_energy') | float + states('sensor.energymonitor2_circuit_5_daily_energy') | float + states('sensor.energymonitor2_circuit_6_daily_energy') | float + states('sensor.energymonitor2_circuit_7_daily_energy') | float + states('sensor.energymonitor2_circuit_8_daily_energy') | float + states('sensor.wh_herd_double_breaker_240v') | float + states('sensor.wh_ac_double_breaker_240v') | float + states('sensor.wh_pump_double_breaker_240v') | float + states('sensor.wh_dryer_double_breaker_240v') | float) | round(2) }}"
availability: "{{ has_value('sensor.energymonitor1_circuit_1_daily_energy_2') and has_value('sensor.energymonitor1_circuit_6_daily_energy_2') and has_value('sensor.energymonitor1_circuit_7_daily_energy_2') and has_value('sensor.energymonitor1_circuit_8_daily_energy_2') and has_value('sensor.energymonitor1_circuit_9_daily_energy_2') and has_value('sensor.energymonitor1_circuit_10_daily_energy_2') and has_value('sensor.energymonitor1_circuit_11_daily_energy_2') and has_value('sensor.energymonitor1_circuit_12_daily_energy_2') and has_value('sensor.energymonitor2_circuit_1_daily_energy') and has_value('sensor.energymonitor2_circuit_2_daily_energy') and has_value('sensor.energymonitor2_circuit_3_daily_energy') and has_value('sensor.energymonitor2_circuit_4_daily_energy') and has_value('sensor.energymonitor2_circuit_5_daily_energy') and has_value('sensor.energymonitor2_circuit_6_daily_energy') and has_value('sensor.energymonitor2_circuit_7_daily_energy') and has_value('sensor.energymonitor2_circuit_8_daily_energy') and has_value('sensor.wh_herd_double_breaker_240v') and has_value('sensor.wh_ac_double_breaker_240v') and has_value('sensor.wh_pump_double_breaker_240v') and has_value('sensor.wh_dryer_double_breaker_240v') }}"