mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-03 22:47:47 +00:00
wip
This commit is contained in:
parent
7f216699ac
commit
6347889fcb
@ -373,24 +373,6 @@ const getEnergyInfoAndCO2Signal = async (
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const getEnergyData = async (
|
|
||||||
hass: HomeAssistant,
|
|
||||||
prefs: EnergyPreferences,
|
|
||||||
start: Date,
|
|
||||||
end?: Date,
|
|
||||||
compare?: boolean
|
|
||||||
): Promise<EnergyData> => {
|
|
||||||
const energyInfoAndCO2Signal = await getEnergyInfoAndCO2Signal(hass);
|
|
||||||
return getEnergyDataWithInfo(
|
|
||||||
hass,
|
|
||||||
energyInfoAndCO2Signal,
|
|
||||||
prefs,
|
|
||||||
start,
|
|
||||||
end,
|
|
||||||
compare
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const getEnergyDataWithInfo = async (
|
const getEnergyDataWithInfo = async (
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
energyInfoAndCO2Signal: EnergyInfoAndCO2Signal,
|
energyInfoAndCO2Signal: EnergyInfoAndCO2Signal,
|
||||||
@ -663,8 +645,10 @@ export const getEnergyDataCollection = (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return getEnergyData(
|
const energyInfoAndCO2Signal = await getEnergyInfoAndCO2Signal(hass);
|
||||||
|
return getEnergyDataWithInfo(
|
||||||
hass,
|
hass,
|
||||||
|
energyInfoAndCO2Signal,
|
||||||
collection.prefs,
|
collection.prefs,
|
||||||
collection.start,
|
collection.start,
|
||||||
collection.end,
|
collection.end,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user