Skip to content

Commit 0fd8333

Browse files
committed
fix(ENTERTAINMENT_DEVICE): Add docs and examples; close #46
1 parent a4c2edf commit 0fd8333

File tree

2 files changed

+171
-0
lines changed

2 files changed

+171
-0
lines changed

examples/entertainment-device.json

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
[
2+
{
3+
"id": "20ba7c9f.2c3f64",
4+
"type": "vsh-virtual-device",
5+
"z": "7ecdfb0b.fa7794",
6+
"name": "bedroom TV",
7+
"topic": "bedroom/tv",
8+
"connection": "",
9+
"template": "ENTERTAINMENT_DEVICE",
10+
"passthrough": false,
11+
"diff": false,
12+
"filter": false,
13+
"x": 970,
14+
"y": 1620,
15+
"wires": [["2fd107a5.7060b8"]]
16+
},
17+
{
18+
"id": "8184a2ed.ed96a",
19+
"type": "comment",
20+
"z": "7ecdfb0b.fa7794",
21+
"name": "ENTERTAINMENT DEVICE",
22+
"info": "",
23+
"x": 950,
24+
"y": 1180,
25+
"wires": []
26+
},
27+
{
28+
"id": "82b4b087.1bb01",
29+
"type": "comment",
30+
"z": "7ecdfb0b.fa7794",
31+
"name": "Alexa, change the input to DVD on the Bedroom TV.",
32+
"info": "",
33+
"x": 1070,
34+
"y": 1220,
35+
"wires": []
36+
},
37+
{
38+
"id": "2fd107a5.7060b8",
39+
"type": "debug",
40+
"z": "7ecdfb0b.fa7794",
41+
"name": "",
42+
"active": true,
43+
"tosidebar": true,
44+
"console": false,
45+
"tostatus": false,
46+
"complete": "true",
47+
"targetType": "full",
48+
"statusVal": "",
49+
"statusType": "auto",
50+
"x": 1150,
51+
"y": 1620,
52+
"wires": []
53+
},
54+
{
55+
"id": "1fd55520.5de0eb",
56+
"type": "comment",
57+
"z": "7ecdfb0b.fa7794",
58+
"name": "Alexa, set the volume of the Bedroom TV to 50.",
59+
"info": "",
60+
"x": 1060,
61+
"y": 1260,
62+
"wires": []
63+
},
64+
{
65+
"id": "4bf13e64.5d61b",
66+
"type": "comment",
67+
"z": "7ecdfb0b.fa7794",
68+
"name": "Alexa, turn the volume down on the Bedroom TV by 20.",
69+
"info": "",
70+
"x": 1080,
71+
"y": 1300,
72+
"wires": []
73+
},
74+
{
75+
"id": "3bd5debb.559c32",
76+
"type": "comment",
77+
"z": "7ecdfb0b.fa7794",
78+
"name": "Alexa, turn the volume down on Bedroom TV.",
79+
"info": "",
80+
"x": 1050,
81+
"y": 1340,
82+
"wires": []
83+
},
84+
{
85+
"id": "8bf6d33b.12e1b",
86+
"type": "comment",
87+
"z": "7ecdfb0b.fa7794",
88+
"name": "Alexa, mute Bedroom TV.",
89+
"info": "",
90+
"x": 990,
91+
"y": 1380,
92+
"wires": []
93+
},
94+
{
95+
"id": "834842b6.f87e1",
96+
"type": "comment",
97+
"z": "7ecdfb0b.fa7794",
98+
"name": "Alexa, unmute Bedroom TV.",
99+
"info": "",
100+
"x": 1000,
101+
"y": 1420,
102+
"wires": []
103+
},
104+
{
105+
"id": "b6ba1fdf.c2c96",
106+
"type": "comment",
107+
"z": "7ecdfb0b.fa7794",
108+
"name": "Alexa, change the channel to 200 on the Bedroom TV.",
109+
"info": "",
110+
"x": 1080,
111+
"y": 1460,
112+
"wires": []
113+
},
114+
{
115+
"id": "b97f1566.8a4e98",
116+
"type": "comment",
117+
"z": "7ecdfb0b.fa7794",
118+
"name": "lexa, next channel on the Bedroom TV.",
119+
"info": "",
120+
"x": 1030,
121+
"y": 1500,
122+
"wires": []
123+
},
124+
{
125+
"id": "d2a795ba.f289f8",
126+
"type": "comment",
127+
"z": "7ecdfb0b.fa7794",
128+
"name": "Alexa, channel down on the Bedroom TV.",
129+
"info": "",
130+
"x": 1040,
131+
"y": 1540,
132+
"wires": []
133+
}
134+
]

virtual-device.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,43 @@ <h4>Dimmer Switch</h4>
439439
<dd>Brightness in % (0...100)</dd>
440440
</dl>
441441

442+
<h4>Entertainment Device</h4>
443+
<dl class="message-properties">
444+
<dt>
445+
payload.channel
446+
<span class="property-type">int</span>
447+
</dt>
448+
<dd>Channel number (1...999)</dd>
449+
<dt>
450+
payload.input
451+
<span class="property-type">string</span>
452+
</dt>
453+
<dd>
454+
Input source (e.g. 'HDMI 1',
455+
<a
456+
href="https://developer.amazon.com/en-US/docs/alexa/device-apis/alexa-inputcontroller.html"
457+
>etc.</a
458+
>)
459+
</dd>
460+
<dt>
461+
payload.muted
462+
<span class="property-type">boolean</span>
463+
</dt>
464+
<dd>
465+
<code>true</code> when the speaker is muted, otherwise <code>false</code>
466+
</dd>
467+
<dt>
468+
payload.powerState
469+
<span class="property-type">string</span>
470+
</dt>
471+
<dd>'ON' or 'OFF'</dd>
472+
<dt>
473+
payload.volume
474+
<span class="property-type">int</span>
475+
</dt>
476+
<dd>Volume in % (0...100)</dd>
477+
</dl>
478+
442479
<h4>Fan</h4>
443480
<dl class="message-properties">
444481
<dt>

0 commit comments

Comments
 (0)