fix: Add missing state_class to MQTT HA discovery topics - #61
Merged
BorisBrock merged 1 commit intoApr 21, 2026
Merged
BorisBrock merged 1 commit into
BorisBrock merged 1 commit into
Conversation
Owner
|
@sevorl Hi, danke für den PR. In den Osterferien habe ich hoffentlich Zeit draufzuschauen und ihn zu testen. Könntest du noch die Konflikte auflösen? |
- Add state_class:measurement to charging_power, charging_current, charging_current_limit, and temperature sensors so HA records long-term statistics and shows them in the Energy Dashboard - Add missing discovery topics for charging_current phase 2 and 3 (previously published to MQTT but invisible to Home Assistant) - Add missing discovery topics for charging_voltage phase 1, 2 and 3 (previously published to MQTT but invisible to Home Assistant) - Rename charging_current discovery topic from 'charging_current' to 'charging_current_phase1' for consistency with the new phase sensors
sebatze
force-pushed
the
fix/ha-mqtt-state-class-and-missing-phase-sensors
branch
from
March 30, 2026 06:48
401ddfc to
97fd9b2
Compare
Contributor
Author
|
@BorisBrock, die Konflikte sind gelöst... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Home Assistant only records long-term statistics (and shows sensors in the Energy Dashboard) for sensors that have a state_class in their MQTT discovery payload. Additionally, charging_current phase 2 & 3 and all three charging_voltage phases were published to MQTT but had no discovery topics, making them completely invisible to Home Assistant.
Changes
Add "state_class":"measurement" to charging_power, charging_current, charging_current_limit, and temperature
Add missing HA discovery topics for charging_current phase 2 & 3
Add missing HA discovery topics for charging_voltage phase 1, 2 & 3
Rename charging_current discovery topic to charging_current_phase1 for consistency
Reference: https://www.home-assistant.io/more-info/statistics/