mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Add week period to statistics card (#14162)
This commit is contained in:
parent
0b18875d70
commit
c12e6662dd
@ -110,7 +110,7 @@ export const fetchStatistics = (
|
||||
startTime: Date,
|
||||
endTime?: Date,
|
||||
statistic_ids?: string[],
|
||||
period: "5minute" | "hour" | "day" | "month" = "hour",
|
||||
period: "5minute" | "hour" | "day" | "week" | "month" = "hour",
|
||||
units?: StatisticsUnitConfiguration
|
||||
) =>
|
||||
hass.callWS<Statistics>({
|
||||
|
@ -59,6 +59,7 @@ const cardConfigStruct = assign(
|
||||
literal("5minute"),
|
||||
literal("hour"),
|
||||
literal("day"),
|
||||
literal("week"),
|
||||
literal("month"),
|
||||
])
|
||||
),
|
||||
@ -67,7 +68,7 @@ const cardConfigStruct = assign(
|
||||
})
|
||||
);
|
||||
|
||||
const periods = ["5minute", "hour", "day", "month"] as const;
|
||||
const periods = ["5minute", "hour", "day", "week", "month"] as const;
|
||||
const stat_types = ["mean", "min", "max", "sum", "state"] as const;
|
||||
|
||||
@customElement("hui-statistics-graph-card-editor")
|
||||
|
@ -4020,6 +4020,7 @@
|
||||
"hour": "Hour",
|
||||
"day": "Day",
|
||||
"month": "Month",
|
||||
"week": "Week",
|
||||
"5minute": "5 Minutes"
|
||||
},
|
||||
"pick_statistic": "Add a statistic",
|
||||
|
Loading…
x
Reference in New Issue
Block a user