mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-18 23:06:40 +00:00
Specify period when fetching statistics (#10040)
Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
cb11c6b3ea
commit
2240d019f5
@ -294,13 +294,15 @@ export const fetchStatistics = (
|
||||
hass: HomeAssistant,
|
||||
startTime: Date,
|
||||
endTime?: Date,
|
||||
statistic_ids?: string[]
|
||||
statistic_ids?: string[],
|
||||
period: "hour" | "5minute" = "hour"
|
||||
) =>
|
||||
hass.callWS<Statistics>({
|
||||
type: "history/statistics_during_period",
|
||||
start_time: startTime.toISOString(),
|
||||
end_time: endTime?.toISOString(),
|
||||
statistic_ids,
|
||||
period,
|
||||
});
|
||||
|
||||
export const calculateStatisticSumGrowth = (
|
||||
|
Loading…
x
Reference in New Issue
Block a user