mirror of
https://github.com/home-assistant/frontend.git
synced 2025-12-20 10:48:44 +00:00
Add water devices to energy data download (#28242)
This commit is contained in:
@@ -324,6 +324,7 @@ class PanelEnergy extends LitElement {
|
|||||||
|
|
||||||
const energy_sources = energyData.prefs.energy_sources;
|
const energy_sources = energyData.prefs.energy_sources;
|
||||||
const device_consumption = energyData.prefs.device_consumption;
|
const device_consumption = energyData.prefs.device_consumption;
|
||||||
|
const device_consumption_water = energyData.prefs.device_consumption_water;
|
||||||
const stats = energyData.state.stats;
|
const stats = energyData.state.stats;
|
||||||
|
|
||||||
const timeSet = new Set<number>();
|
const timeSet = new Set<number>();
|
||||||
@@ -509,6 +510,20 @@ class PanelEnergy extends LitElement {
|
|||||||
|
|
||||||
printCategory("device_consumption", devices, electricUnit);
|
printCategory("device_consumption", devices, electricUnit);
|
||||||
|
|
||||||
|
if (device_consumption_water) {
|
||||||
|
const waterDevices: string[] = [];
|
||||||
|
device_consumption_water.forEach((source) => {
|
||||||
|
source = source as DeviceConsumptionEnergyPreference;
|
||||||
|
waterDevices.push(source.stat_consumption);
|
||||||
|
});
|
||||||
|
|
||||||
|
printCategory(
|
||||||
|
"device_consumption_water",
|
||||||
|
waterDevices,
|
||||||
|
energyData.state.waterUnit
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const { summedData, compareSummedData: _ } = getSummedData(
|
const { summedData, compareSummedData: _ } = getSummedData(
|
||||||
energyData.state
|
energyData.state
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user