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