Overview device rename, current-power naming, and roof icons - #14
Merged
Conversation
The overview device that groups all summed/total-across-roofs sensors was named after the config entry title (usually just "pvnode"), which duplicated the integration name and didn't convey what the device actually groups. Use DeviceInfo's translation_key instead of a fixed name, so the device shows as "Summary" in English and "Gesamt" in German (falls back to the translation_key itself for any other language, per HA's translation resolution).
Rename the "power"/"total_power" translation keys from "Power forecast"/"Total power forecast" to "Current power forecast"/"Total current power forecast" (German: "Leistungsprognose aktuell"/"Gesamt-Leistungsprognose aktuell"), making clear these show the current time slot's value rather than the whole forecast. Add icons.json giving every per-roof-surface sensor (power, energy per day, clear-sky power) the mdi:home-roof icon, visually tying them to the physical roof surface they belong to. The summary/overview device's sensors keep their existing device-class-driven icons.
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.
Summary
PvnodeTotalEntity'sDeviceInfofrom a fixedname=entry.titletotranslation_key="overview", resolved via a newdevice.overview.nametranslation entry: "Summary" in English, "Gesamt" in German.icons.jsongiving every per-roof-surface sensor (power, energy per day, clear-sky power) themdi:home-rooficon, so they're visually recognizable as belonging to a physical roof surface. The summary/overview device's sensors keep their existing device-class-driven icons (unchanged).Compatibility note
These only change displayed names/icons - existing installations keep their current
entity_ids (HA doesn't rename already-registered entities when the underlying device/entity name or translation changes), so this is not a breaking change for anyone upgrading. Only brand-new setups (or the test suite, which spins up fresh entities every time) get entity_ids derived from the new names, e.g.sensor.summary_total_current_power_forecast/sensor.dachflache_1_current_power_forecastinstead ofsensor.pvnode_total_power_forecast/sensor.dachflache_1_power_forecast.Test plan
pytest tests/ -v— all 22 tests pass (entity_id assertions updated for the new names)ruff check/ruff format --check— cleanstrings.json/translations/en.json/translations/de.json/icons.jsonall parse as valid JSONhelpers/icon.py/helpers/entity.pyto confirm the resolution mechanism and file-discovery convention (no manifest change needed).