Repository navigation
Replies: 4 comments 1 reply
|
Isn't this a UX concern? On the backend we allow managing devices, and on the frontend it's about how we display it. |
|
From a user perspective I would prefer option A. |
|
Fair point @balloob. The backend already handles the math fine when both sensors are added. The reason people resort to template helpers today is purely visual: the energy cards and summary table list each DC port as a separate item, with no way to group them or give them a shared label like "Balcony Solar". It also makes solar forecasting awkward when forecast integrations expect a single system rather than individual ports. If we keep this strictly on the frontend side, how would you prefer to handle it? Two natural options come to mind:
I am happy to take this to the frontend repo if you think that is where the change belongs. |
|
Following up on @balloob's feedback regarding this being a frontend/UX concern: I have opened the dedicated discussion on the frontend repository here: home-assistant/frontend#55275 detailing the display options (grouping labels vs. device-registry aggregation in Energy cards). Closing the loop on the architecture side. |
Uh oh!
There was an error while loading. Please reload this page.
Context & Problem Statement
A large and rapidly growing proportion of residential self-consumption photovoltaic installations (especially plug-and-play balcony solar kits and rooftop arrays) use multi-port micro-inverters (e.g., Hoymiles HMS-1000W-2T / HMS-2000, APSystems DS3 / EZ1, Enphase IQ8).
Hardware-focused integrations (Zigbee2MQTT, OpenDTU, APSystems Local/EZ1, etc.) natively expose one cumulative energy sensor per DC input port:
sensor.inverter_energy_port_1sensor.inverter_energy_port_2Currently, when configuring the official Home Assistant Energy Dashboard (
/config/energy):state_class: total_increasing,device_class: energy, matching unitsWhorkWh, and availability handling).total_increasing, lacking float fallbacks, or misinterpretingunavailablestates), long-term statistics either fail silently or suffer massive artificial spikes upon reboot.This directly conflicts with the stated design principle: "The energy dashboard needs to be simple to setup and use for beginners" (Discussion #1335).
Proposed Solution
Allow grouping multiple cumulative energy entities under a single named Solar Production source directly within the Energy Dashboard UI and preferences (
.storage/energy).Option 1: Multi-entity aggregation in Energy Dashboard preferences (Preferred)
Extend the Solar Production configuration dialog (
type: "solar") so that a single named solar source entry can accept either a single entity or a list ofstat_energy_fromentities:{ "type": "solar", "name": "Balcony Solar (1000W)", "stat_energy_from": [ "sensor.inverter_port_1_energy", "sensor.inverter_port_2_energy" ] }Since the Energy backend already calculates hourly deltas for statistics, summing the hourly deltas of the grouped entities before rendering solar production is mathematically identical to an intermediate template sensor, but with zero user-side configuration overhead.
Option 2: Config Flow Helper Preset ("Combined Energy Source")
Alternatively, provide a native 1-click helper preset in Settings > Devices & Services > Helpers specifically tailored for aggregating energy meters. The helper would take a list of energy sensors and automatically enforce
device_class: energy, unit matching, andstate_class: total_increasing.Benefits
All reactions