-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathScenesOverrides.ts
62 lines (57 loc) · 1.64 KB
/
ScenesOverrides.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
/**
* @license
* Copyright 2022-2025 Matter.js Authors
* SPDX-License-Identifier: Apache-2.0
*/
import { FeatureMap } from "@matter/model";
import { LocalMatter } from "../local.js";
LocalMatter.children.push({
tag: "cluster",
name: "Scenes",
until: "1.3",
children: [
// Enable scene names by default. Not mandated by the specification but a reasonable default
{
tag: "attribute",
id: FeatureMap.id,
name: FeatureMap.name,
children: [{ tag: "field", name: "SN", default: true }],
},
// Set NameSupport default to match feature default per the specification
{
tag: "attribute",
id: 4,
name: "NameSupport",
children: [{ tag: "field", name: "NameSupport", default: true, constraint: "7" }],
},
// The following commands use the same fields as the unenhanced versions
{
tag: "command",
id: 0x40,
name: "EnhancedAddScene",
type: "AddScene",
direction: "request",
},
{
tag: "command",
id: 0x40,
name: "EnhancedAddSceneResponse",
type: "AddSceneResponse",
direction: "response",
},
{
tag: "command",
id: 0x41,
name: "EnhancedViewScene",
type: "ViewScene",
direction: "request",
},
{
tag: "command",
id: 0x41,
name: "EnhancedViewSceneResponse",
type: "ViewSceneResponse",
direction: "response",
},
],
});