-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuplus.device.airpurifier.json
More file actions
59 lines (59 loc) · 2.83 KB
/
Copy pathuplus.device.airpurifier.json
File metadata and controls
59 lines (59 loc) · 2.83 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
{
"id": "http://openinterconnect.org/uplusocfmapping/schemas/uplus.device.airpurifier.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "Copyright (c) 2018 Open Connectivity Foundation, Inc. All rights reserved.",
"title": "AirPurifier Mapping",
"definitions": {
"uplus.device.airpurifier": {
"type": "object",
"properties": {
"onOffStatus": {
"type" : "boolean",
"description": "the switch of air purifier",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.switch.binary.value",
"x-to-ocf": [
"oic.r.switch.value = onOffStatus"
],
"x-from-ocf": [
"onOffStatus = oic.r.switch.value"
]
}
},
"windSpeed": {
"type": "integer" ,
"description": "wind speed",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.selectablelevels",
"x-to-ocf": [
"availablelevels=[0,1,2,3,4]",
"targetlevel=windSpeed"
],
"x-from-ocf": [
"windSpeed=targetlevel"
]
}
},
"operationMode": {
"type": "integer" ,
"description": "",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.mode",
"x-to-ocf": [
"supportedModes= [\"Auto\",\"Quiet\",\"Sleep\"]",
"modes=supportedModes[operationMode]"
],
"x-from-ocf": [
"operationMode= supportedModes.indexof(modes)"
]
}
}
}
}
},
"type": "object",
"allOf": [
{"$ref": "#/definitions/uplus.device.airpurifier"}
],
"required": ["onOffStatus","windSpeed","operationMode"]
}