-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathasa.environment.targethumidity.json
More file actions
87 lines (87 loc) · 2.76 KB
/
asa.environment.targethumidity.json
File metadata and controls
87 lines (87 loc) · 2.76 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{
"id": "http://openinterconnect.org/asamapping/schemas/asa.environment.targethumidity.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "Copyright (c) 2017 Open Connectivity Foundation, Inc. All rights reserved.",
"title": "Target Humidity",
"definitions": {
"asa.environment.targethumidity": {
"type": "object",
"properties": {
"targetvalue": {
"type": "number",
"description": "Measured value",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.humidity,oic.r.selectablelevels",
"x-to-ocf": [
"if minvalue != maxvalue, ocf.desiredhumidity = targetvalue;ocf.targetlevel = selectablehumiditylevels[0].",
"if minvalue == maxvalue, ocf.targetlevel = targetvalue."
],
"x-from-ocf": [
"if x-ocf-alias == oic.r.humidity, targetvalue = desiredhumidity.",
"if x-ocf-alias == oic.r.selectablelevels, targetvalue = targetlevel."
]
}
},
"minvalue": {
"type": "number",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.humidity",
"x-to-ocf": [
"range[0] = minvalue"
],
"x-from-ocf": [
"minvalue = range[0]",
"otherwise: minvalue = 0"
]
}
},
"maxvalue": {
"type": "number",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.humidity",
"x-to-ocf": [
"range[1] = maxvalue"
],
"x-from-ocf": [
"maxvalue = range[1]",
"otherwise: maxvalue = 100"
]
}
},
"stepvalue": {
"type": "number",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.humidity",
"x-to-ocf": [
"step = stepvalue"
],
"x-from-ocf": [
"stepvalue = step",
"otherwise: stepvalue = 1"
]
}
},
"selectablehumiditylevels": {
"type": "array",
"items": {
"type": "number"
},
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.selectablelevels",
"x-to-ocf": [
"availablelevels[] = selectablehumiditylevels[]"
],
"x-from-ocf": [
"selectablehumiditylevels[] = availablelevels[]"
]
}
}
}
}
},
"type": "object",
"allOf": [
{"$ref": "#/definitions/asa.environment.targethumidity"}
],
"required": [ "targetvalue","minvalue","maxvalue","stepvalue","selectablehumiditylevels" ]
}