/
const.ts
89 lines (78 loc) · 1.84 KB
/
const.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/** Constants to be used in the frontend. */
// Constants should be alphabetically sorted by name.
// Arrays with values should be alphabetically sorted if order doesn't matter.
// Each constant should have a description what it is supposed to be used for.
/** Icon to use when no icon specified for domain. */
export const DEFAULT_DOMAIN_ICON = "hass:bookmark";
/** Panel to show when no panel is picked. */
export const DEFAULT_PANEL = "lovelace";
/** Domains that have a state card. */
export const DOMAINS_WITH_CARD = [
"climate",
"cover",
"configurator",
"input_select",
"input_number",
"input_text",
"lock",
"media_player",
"scene",
"script",
"timer",
"vacuum",
"water_heater",
"weblink"
];
/** Domains with separate more info dialog. */
export const DOMAINS_WITH_MORE_INFO = [
"alarm_control_panel",
"automation",
"camera",
"climate",
"configurator",
"cover",
"fan",
"group",
"history_graph",
"input_datetime",
"light",
"lock",
"media_player",
"script",
"sun",
"updater",
"vacuum",
"water_heater",
"weather"
];
/** Domains that show no more info dialog. */
export const DOMAINS_HIDE_MORE_INFO = [
"input_number",
"input_select",
"input_text",
"scene",
"weblink"
];
/** Domains that should have the history hidden in the more info dialog. */
export const DOMAINS_MORE_INFO_NO_HISTORY = [
"camera",
"configurator",
"history_graph",
"scene"
];
/** States that we consider "off". */
export const STATES_OFF = ["closed", "locked", "off"];
/** Domains where we allow toggle in Lovelace. */
export const DOMAINS_TOGGLE = new Set([
"fan",
"input_boolean",
"light",
"switch",
"group",
"automation"
]);
/** Temperature units. */
export const UNIT_C = "°C";
export const UNIT_F = "°F";
/** Entity ID of the default view. */
export const DEFAULT_VIEW_ENTITY_ID = "group.default_view";