Hi!
First of all, a huge thank you to the developers and everybody involved in the forums, it has been a breeze to set everything up so far. Although there is one minor thing that doesn’t quote work yet or that I rather don’t really understand.
I have two Zigbee power outlets that report the total amount of energy used. It’s a simple numeric sensor that just counts “lifetime” kWh usage should be no issue here.
I am adding values of two outlets together with this template:
sensor:
# Sensor templates
- platform: template
sensors:
# Tuya plugs total energy
total_kwh:
unit_of_measurement: "kWh"
value_template: "{{ ( states('sensor.tuya_smart_plug_01_energy') | float + states('sensor.tuya_smart_plug_02_energy') | float ) | round(2) }}"
I want to get the mothly and daily energy usage out of this value, but the utility_meter
integration, which I thought was fitting here, provides wrong values.
This configuration:
# Utility Meter integration
utility_meter:
energy_daily:
source: sensor.total_kwh
cycle: daily
energy_monthly:
source: sensor.total_kwh
cycle: monthly
results in this output:
Which does not make sense, as the sensor.total_kwh
is only reporting about 5 kWh. It seems like on a restart of HASS to reload the config, the current value is added to the daily meter. I think the utility_meter
is probably rather used for meters, that to emit a daily kWh value, from what I understand.
So is there an easy way to create a sensor that creates daily and monthly values from a cumulative, total meter?
Thanks in advance!