mirror of
https://github.com/home-assistant/frontend.git
synced 2025-08-02 14:07:55 +00:00
Add option to display state
This commit is contained in:
parent
0f534423a4
commit
87dedeb9b3
@ -38,6 +38,7 @@ export const statTypeMap: Record<ExtendedStatisticType, StatisticType> = {
|
||||
max: "max",
|
||||
sum: "sum",
|
||||
sum_rel: "sum",
|
||||
state: "sum",
|
||||
};
|
||||
@customElement("statistics-chart")
|
||||
class StatisticsChart extends LitElement {
|
||||
|
@ -39,6 +39,7 @@ import { deepEqual } from "../../../../common/util/deep-equal";
|
||||
import { statTypeMap } from "../../../../components/chart/statistics-chart";
|
||||
|
||||
const statTypeStruct = union([
|
||||
literal("state"),
|
||||
literal("sum"),
|
||||
literal("sum_rel"),
|
||||
literal("min"),
|
||||
@ -66,7 +67,7 @@ const cardConfigStruct = assign(
|
||||
);
|
||||
|
||||
const periods = ["5minute", "hour", "day", "month"] as const;
|
||||
const stat_types = ["mean", "min", "max", "sum", "sum_rel"] as const;
|
||||
const stat_types = ["mean", "min", "max", "sum", "sum_rel", "state"] as const;
|
||||
|
||||
@customElement("hui-statistics-graph-card-editor")
|
||||
export class HuiStatisticsGraphCardEditor
|
||||
|
@ -517,6 +517,7 @@
|
||||
"min": "min",
|
||||
"max": "max",
|
||||
"mean": "mean",
|
||||
"state": "state",
|
||||
"sum": "sum",
|
||||
"sum_rel": "change"
|
||||
}
|
||||
@ -3970,6 +3971,7 @@
|
||||
"mean": "Mean",
|
||||
"min": "Min",
|
||||
"max": "Max",
|
||||
"state": "State",
|
||||
"sum": "Sum (absolute)",
|
||||
"sum_rel": "Change"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user