-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlight_machine.json
More file actions
38 lines (38 loc) · 840 Bytes
/
light_machine.json
File metadata and controls
38 lines (38 loc) · 840 Bytes
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
{
"id": "light",
"initialState": "off",
"states": [
{ "id": "off", "onEnter": ["call_light_off"] },
{ "id": "on", "onEnter": ["call_light_on"] }
],
"actions": [
{
"id": "call_light_on",
"type": "CALL",
"target": "light_on_service",
"parameters": {}
},
{
"id": "call_light_off",
"type": "CALL",
"target": "light_off_service",
"parameters": {}
}
],
"functions": [
{
"id": "light_on_service",
"type": "EXTERNAL",
"endpoint": "http://light-controller.local/on"
},
{
"id": "light_off_service",
"type": "EXTERNAL",
"endpoint": "http://light-controller.local/off"
}
],
"transitions": [
{ "from": "off", "event": "approaching", "to": "on" },
{ "from": "on", "event": "leaving", "to": "off" }
]
}