-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy pathThermostatOverrides.ts
More file actions
112 lines (108 loc) · 3.74 KB
/
ThermostatOverrides.ts
File metadata and controls
112 lines (108 loc) · 3.74 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/**
* @license
* Copyright 2022-2026 Matter.js Authors
* SPDX-License-Identifier: Apache-2.0
*/
import { FieldValue } from "@matter/model";
import { LocalMatter } from "../local.js";
LocalMatter.children.push({
tag: "cluster",
name: "Thermostat",
asOf: "1.3",
children: [
// See comments in ChannelClusterOverrides.ts... Another example of clusters illegally referencing structures
// in other clusters
{
tag: "datatype",
name: "OccupancyBitmap",
type: "OccupancySensing.OccupancyBitmap",
until: "1.3",
},
{
tag: "attribute",
id: 0x1b,
name: "ControlSequenceOfOperation",
default: FieldValue.None,
},
// TODO This is temporary and should be in a new "Global Commands" section later because in fact it is generically
// defined in the Matter Spec. Right now this is only used by Thermostat so we place it here for now.
{
tag: "command",
name: "AtomicRequest",
id: 0xfe,
access: "O",
conformance: "PRES | MSCH",
direction: "request",
response: "AtomicResponse",
children: [
{
tag: "field",
id: 0,
name: "RequestType",
type: "enum8",
conformance: "M",
children: [
{ tag: "field", name: "BeginWrite", id: 0 },
{ tag: "field", name: "CommitWrite", id: 1 },
{ tag: "field", name: "RollbackWrite", id: 2 },
],
},
{
tag: "field",
id: 1,
name: "AttributeRequests",
type: "list",
conformance: "M",
children: [{ tag: "field", name: "entry", type: "attrib-id" }],
},
{ tag: "field", id: 2, name: "Timeout", type: "uint16", conformance: "O" },
],
},
{
tag: "command",
name: "AtomicResponse",
id: 0xfd,
direction: "response",
children: [
{
tag: "field",
id: 0,
name: "StatusCode",
type: "status",
conformance: "M",
},
{
tag: "field",
id: 1,
name: "AttributeStatus",
type: "list",
conformance: "M",
children: [
{
tag: "field",
name: "entry",
type: "struct",
children: [
{
tag: "field",
id: 0,
name: "AttributeId",
type: "attrib-id",
conformance: "M",
},
{
tag: "field",
id: 1,
name: "StatusCode",
type: "status",
conformance: "M",
},
],
},
],
},
{ tag: "field", id: 2, name: "Timeout", type: "uint16", conformance: "O" },
],
},
],
});