esphome-ewh icon indicating copy to clipboard operation
esphome-ewh copied to clipboard

Energy Calculation

Open Korol-Yurii opened this issue 3 years ago • 1 comments

Perhaps it is possible to "catch" the idle state of the water heater by the help of small calculations between current water temperature and set water temperature. In case current_temperature<set_temperature the water heater is working. The power consumption is also known because it can be of 3 states. I usually use my water heater only at 2000W. So in configuration.yaml I've created a simple binary sensor to measure power consumption.

`binary_sensor:

  • platform: template sensors: boiler_state: friendly_name: Boiler State entity_id: - binary_sensor.boiler_state value_template: >- {%- if (state_attr('climate.water_heater', 'temperature')-state_attr('climate.water_heater', 'current_temperature'))>1 -%} on {%- else -%} off {%- endif -%}

sensor:

  • platform: powercalc entity_id: binary_sensor.boiler_state create_energy_sensor: true mode: fixed fixed: power: 2000 name: "Water heater consumption"`

I'm still testing this scenario. Any thoughts about its usability?

Korol-Yurii avatar Aug 27 '22 14:08 Korol-Yurii

I already thought about a similar implementation, but I didn't get around to checking everything ) So if your test was good enough I will implement this feature.

dentra avatar Oct 11 '22 17:10 dentra