mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Add Sankey chart to the energy dashboard (#26192)
* Add Sankey chart to the energy dashboard * hide floors & areas if there is an explicit hierarchy
This commit is contained in:
parent
5f2b11ca9f
commit
1b68c51a05
@ -184,6 +184,16 @@ export class EnergyViewStrategy extends ReactiveElement {
|
||||
type: "energy-devices-graph",
|
||||
collection_key: "energy_dashboard",
|
||||
});
|
||||
const showFloorsNAreas = !prefs.device_consumption.some(
|
||||
(d) => d.included_in_stat
|
||||
);
|
||||
view.cards!.push({
|
||||
title: hass.localize("ui.panel.energy.cards.energy_sankey_title"),
|
||||
type: "energy-sankey",
|
||||
collection_key: "energy_dashboard",
|
||||
group_by_floor: showFloorsNAreas,
|
||||
group_by_area: showFloorsNAreas,
|
||||
});
|
||||
}
|
||||
|
||||
return view;
|
||||
|
Loading…
x
Reference in New Issue
Block a user