Skip to content

Commit bd894ab

Browse files
Betty-HaierData Model Work Group Chair
authored andcommitted
Approved: Haier Air Conditioner
1 parent df78f65 commit bd894ab

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

uplus.device.airconditioner.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"id": "http://openinterconnect.org/uplusocfmapping/schemas/uplus.device.airconditioner.json#",
3+
"$schema": "http://json-schema.org/draft-04/schema#",
4+
"description" : "Copyright (c) 2018 Open Connectivity Foundation, Inc. All rights reserved.",
5+
"title": "AirConditioner Mapping",
6+
"definitions": {
7+
"uplus.device.airconditioner": {
8+
"type": "object",
9+
"properties": {
10+
"onOffStatus": {
11+
"type" : "boolean",
12+
"description": "the switch of air conditioner",
13+
"x-ocf-conversion": {
14+
"x-ocf-alias": "oic.r.switch.binary.value",
15+
"x-to-ocf": [
16+
"oic.r.switch.value = onOffStatus"
17+
],
18+
"x-from-ocf": [
19+
"onOffStatus=oic.r.switch.value"
20+
]
21+
}
22+
},
23+
"targetTemperature": {
24+
"type": "number",
25+
"description": "target temperature",
26+
"x-ocf-conversion": {
27+
"x-ocf-alias": "oic.r.temperature.temperature",
28+
"x-to-ocf": [
29+
"oic.r.temperature.temperature=targetTemperature"
30+
],
31+
"x-from-ocf": [
32+
"targetTemperature=oic.r.temperature.temperature"
33+
]
34+
}
35+
},
36+
"windSpeed": {
37+
"type": "integer" ,
38+
"description": "wind speed",
39+
"x-ocf-conversion": {
40+
"x-ocf-alias": "oic.r.selectablelevels",
41+
"x-to-ocf": [
42+
"availablelevels=[1,2,3,4,5]",
43+
"targetlevel=windSpeed"
44+
],
45+
"x-from-ocf": [
46+
"windSpeed=targetlevel"
47+
]
48+
}
49+
},
50+
"operationMode": {
51+
"type": "integer" ,
52+
"description": "",
53+
"x-ocf-conversion": {
54+
"x-ocf-alias": "oic.r.mode",
55+
"x-to-ocf": [
56+
"supportedModes= [\"Auto\",\"Cool\",\"Dry\",\"Warm\",\"Wind\"]",
57+
"modes=supportedModes[operationMode]"
58+
],
59+
"x-from-ocf": [
60+
"operationMode= supportedModes.indexof(modes)"
61+
]
62+
}
63+
}
64+
}
65+
}
66+
},
67+
"type": "object",
68+
"allOf": [
69+
{"$ref": "#/definitions/uplus.device.airconditioner"}
70+
],
71+
"required": ["onOffStatus","targetTemperature","windSpeed","operationMode"]
72+
}

0 commit comments

Comments
 (0)