Skip to content

Commit 8ade8be

Browse files
committed
Merge branch '185-derived-sensor-docs' into main
2 parents 1a06b97 + 27d0698 commit 8ade8be

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,26 @@ OR
5353

5454
![401221389-5b7e7316-5a60-4428-93fd-7f5761fa9ed7](https://github.com/user-attachments/assets/7e84f405-fed4-425f-aa96-9504b01bd6ce)
5555

56+
## Tips: derived sensors (e.g. gas-equivalent energy)
57+
58+
The integration exposes the raw sensors needed to derive your own values — for example pellet consumption in kg (`sensor.pellematic_pe1_storage_fill_today`, `sensor.pellematic_pe1_storage_fill_yesterday`, `sensor.pellematic_pe1_l_storage_fill`). Anything that's a fixed-constant calculation on top of those (gas-equivalent volume, CO₂ avoided, cost per day, ...) is best done as a Home Assistant **Template Helper** so you can pick the constants that match your pellet quality and local gas tariff.
59+
60+
### Converting kg of pellets to m³ of natural gas (equivalent energy)
61+
62+
1. Go to **Settings → Devices & services → Helpers → Create helper → Template → Template a sensor**.
63+
2. Use the formula below. Adjust the two constants to match your situation:
64+
- Pellet heating value: ~4.8 kWh/kg for ENplus A1, ~4.6 kWh/kg for ENplus A2
65+
- Natural gas heating value (Hi): ~10.0 kWh/m³ in most of Europe (check your local supplier)
66+
67+
```jinja
68+
{% set kg = states('sensor.pellematic_pe1_storage_fill_today') | float(0) %}
69+
{% set pellet_kwh_per_kg = 4.8 %}
70+
{% set gas_kwh_per_m3 = 10.0 %}
71+
{{ (kg * pellet_kwh_per_kg / gas_kwh_per_m3) | round(2) }}
72+
```
73+
74+
Set unit of measurement to `` and device class to `Gas` so the result shows up in the HA Energy dashboard.
75+
76+
> Why not ship this as a built-in entity? Pellet energy density varies by grade and natural-gas Wobbe Index varies by country — hard-coding the constants would be wrong for many users. The helper keeps the choice in your hands.
77+
5678

0 commit comments

Comments
 (0)