Hi there,
I have a MVHR (heat recovery system) which helpfully sends the number of watts it is using every second to HA. I’d like to calculate it’s daily kWH and have tried a few things but with odd results.
First up I tried a utility meter, but then realised the frequency of updates was causing larger than normal values in the meter. ie, only running for a few minutes and already over 200… There doesn’t appear to be a frequency option in the utility config:
mvhr_daily_energy:
source: sensor.heat_recovery_system_power_usage
cycle: daily
name: MVHR Daily Energy Usage
mvhr_preheater_daily_energy:
source: sensor.heat_recovery_system_preheater_power_usage
cycle: daily
name: MVHR Preheater Daily Energy Usage
I also tried this (some of the keys are incorrect and I can’t remember what they needed changing to:
sensor:
- platform: statistics
name: power_per_minute
entity_id: sensor.heat_recovery_system_power_usage
sample_size: 60 # This is assuming you are getting 1 sample a second. Adjust otherwise.
- platform: template
sensors:
realtime_power:
friendly_name: Realtime Power
value_template: "{{ state_attr('sensor.power_per_minute', 'total') / (1000 * 60) }}"
unit_of_measure: kwH
Here I was getting super small values and I’m not sure why. I think its the ‘sample size’ and ‘unit_of_measure’ values that need tweaking probs ‘unit_of_measurement’ and ‘sampling_size’. Dev tools was reporting a 0.0000n increase per day.
The MVHR is consistently using reporting around 24w and runs all the time which I would think is about 0.5kWh per day?