golles / ha-kamstrup_403

Custom component that integrates the Kamstrup 403 heating system into Home Assistant. This component does also support a few other heating systems
MIT License
70 stars 10 forks source link

Enable "Heat Energy (E1)" to be added as a heat source #42

Closed BramVerheij closed 1 year ago

BramVerheij commented 1 year ago

Did you read the instructions?

The request

I saw the possibility to add a helper entity "Heat Energy to Gas" to express the heat in m3 for the energy panel. However, the energy panel in home-assistant itself says that a entity with GJ can also be selected for the gas source. This might be added recently in Home Assistant?

The "Heat Energy (E1)" however is not listed. The dropdown does point to https://www.home-assistant.io/more-info/statistics/ and https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics which state it could be possible to use an entity as long as the state class is set correctly.

Is it possible to add this state class to "Heat Energy (E1)" so it can be listed under Gas Sources with unit GJ?

Additional information

No response

golles commented 1 year ago

Hi @BramVerheij

However, the energy panel in home-assistant itself says that a entity with GJ can also be selected for the gas source. This might be added recently in Home Assistant?

can you point out where a GJ entity can be added as a gas source? As far as I know, this isn't a possibility, only ft³ and units can be added as gas:

Scherm­afbeelding 2022-11-15 om 20 43 17

Since HA version 2022.11 GJ entities can be added in the Individual devices section.

Is it possible to add this state class to "Heat Energy (E1)" so it can be listed under Gas Sources with unit GJ?

No this isn't possible, this entity has already the correct device and state class, https://github.com/golles/ha-kamstrup_403/blob/main/custom_components/kamstrup_403/sensor.py#L25-L26. And that why the Heat Energy to Gas sensor has been added with its specific device and state class: https://github.com/golles/ha-kamstrup_403/blob/main/custom_components/kamstrup_403/sensor.py#L278-L280 And graphs for gas sensors are much nicer than entities in the Individual devices section, as they are shown as kWh.

golles commented 1 year ago

I've improved the documentation about the energy dashboard integration, have a look at it here: https://github.com/golles/ha-kamstrup_403#integration-in-the-energy-dashboard

Please reopen if something is still unclear and I'll improve it even further.