Skip to content

mqtt-hassio.cfg: match kWh for energy device_class/state_class#1758

Open
ebaschiera wants to merge 1 commit into
john30:masterfrom
ebaschiera:fix/mqtt-hassio-energy-kwh
Open

mqtt-hassio.cfg: match kWh for energy device_class/state_class#1758
ebaschiera wants to merge 1 commit into
john30:masterfrom
ebaschiera:fix/mqtt-hassio-energy-kwh

Conversation

@ebaschiera

Copy link
Copy Markdown

The energy rule in type_switch-number only matched the unit Wh, so energy sensors reporting in kWh (without "energy" in their name) were published without device_class: energy / state_class: total_increasing and were therefore excluded from long-term statistics and the Energy dashboard.

Example: Vaillant StatFuelSum (gas counter, kWh).

This adds ,kWh$ as an explicit alternative, mirroring how the power rule already lists ,kW$|,W$. Tested on ebusd 26.1: a kWh sensor now gets device_class: energy + state_class: total_increasing.

Note: the yield rule below (total*,Wh$) has the same limitation; left unchanged here to keep the fix minimal — happy to extend it (and add MWh) if preferred.

Refs #1756

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant