-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzwave.operation.batterycommandclass.json
More file actions
35 lines (35 loc) · 1.21 KB
/
zwave.operation.batterycommandclass.json
File metadata and controls
35 lines (35 loc) · 1.21 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
{
"id": "http://openinterconnect.org/zwavemapping/schemas/zwave.operation.batterycommandclass.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "Copyright (c) 2018 Open Connectivity Foundation, Inc. All rights reserved.",
"title": "Battery Command Class",
"definitions": {
"zwave.operation.batterycommandclass": {
"type": "object",
"properties": {
"Battery Level": {
"type": [
"if Battery Level = 255, string",
"if Battery Level != 255, integer"
],
"description": "percentage indicating the battery level or low battery warning",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.energy.battery",
"x-to-ocf": [
"if Battery Level = 255, ocf.r.energy.battery.lowbattery = true; ocf.r.energy.battery.charge = 0.",
"if Battery Level != 255, ocf.r.energy.battery.charge = Battery Level."
],
"x-from-ocf": [
"N/A"
]
}
}
}
}
},
"type": "object",
"allOf": [
{"$ref": "#/definitions/zwave.operation.batterycommandclass"}
],
"required": ["Battery Level"]
}