Tidone / homeassistant_eta_integration

Integration of ETA (Heating) sensors and switches to home assistant
MIT License
21 stars 1 forks source link

Total Energie in kWh #6

Closed hubtub2 closed 7 months ago

hubtub2 commented 8 months ago

Hello,

some time ago I wrote the original ETA integration that was now forked the second time, great work! I am still using nigl's fork, but I will try to switch to your fork to have the writable sensors (to add a hot water request button).

I am using this template sensor to convert the total pellet consumption <object uri="/40/10021/0/0/12016" name="Gesamtverbrauch"/> into unit kWh using a factor of 4.8.

This way it can be simply used in the energy panel as "Gas" heater (which only takes entities of unit kWh).

# Convert pellet consumption (kg) to energy consumption (kWh)
template:
  - sensor:
    - name: eta_gesamtenergie
      unique_id: '0a7576cc-d6c1-30ba-1ae1-611518c3497f'
      unit_of_measurement: kWh
      device_class: energy
      state_class: total_increasing 
      state: >
        {{ states('sensor.eta_kessel_zahlerstande_gesamtverbrauch') | float(default=0.0) | multiply(4.8) | round(1) }}

The original ETA integration simply added a "total energy" entitiy. Would this be a feature for your fork?

Tidone commented 8 months ago

Hi,

Thank you for the comment!

It would be easy to implement, but I don't really like to hardcode values, such as the endpoint address, in the code. Also, I don't know if the address for the total pellets consumption is the same for all ETA heaters.

Therefore I think it's best to leave the implementation of these derivative sensors to the user.

I will add a section to the readme describing how to calculate the energy consumption.