mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +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,
|
startTime: Date,
|
||||||
endTime?: Date,
|
endTime?: Date,
|
||||||
statistic_ids?: string[],
|
statistic_ids?: string[],
|
||||||
period: "5minute" | "hour" | "day" | "month" = "hour",
|
period: "5minute" | "hour" | "day" | "week" | "month" = "hour",
|
||||||
units?: StatisticsUnitConfiguration
|
units?: StatisticsUnitConfiguration
|
||||||
) =>
|
) =>
|
||||||
hass.callWS<Statistics>({
|
hass.callWS<Statistics>({
|
||||||
|
@ -59,6 +59,7 @@ const cardConfigStruct = assign(
|
|||||||
literal("5minute"),
|
literal("5minute"),
|
||||||
literal("hour"),
|
literal("hour"),
|
||||||
literal("day"),
|
literal("day"),
|
||||||
|
literal("week"),
|
||||||
literal("month"),
|
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;
|
const stat_types = ["mean", "min", "max", "sum", "state"] as const;
|
||||||
|
|
||||||
@customElement("hui-statistics-graph-card-editor")
|
@customElement("hui-statistics-graph-card-editor")
|
||||||
|
@ -4020,6 +4020,7 @@
|
|||||||
"hour": "Hour",
|
"hour": "Hour",
|
||||||
"day": "Day",
|
"day": "Day",
|
||||||
"month": "Month",
|
"month": "Month",
|
||||||
|
"week": "Week",
|
||||||
"5minute": "5 Minutes"
|
"5minute": "5 Minutes"
|
||||||
},
|
},
|
||||||
"pick_statistic": "Add a statistic",
|
"pick_statistic": "Add a statistic",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user