Level Change values are documented here, but it’s not easy to understand. You should download the device diagnostic file for your device and see which values are exposed. For example, I have:
Level Values
"2-38-0-Up": {
"endpoint": 0,
"commandClass": 38,
"commandClassName": "Multilevel Switch",
"property": "Up",
"propertyName": "Up",
"ccVersion": 2,
"metadata": {
"type": "boolean",
"readable": false,
"writeable": true,
"label": "Perform a level change (Up)",
"ccSpecific": {
"switchType": 2
},
"valueChangeOptions": [
"transitionDuration"
],
"states": {
"true": "Start",
"false": "Stop"
},
"stateful": true,
"secret": false
}
},
"2-38-0-Down": {
"endpoint": 0,
"commandClass": 38,
"commandClassName": "Multilevel Switch",
"property": "Down",
"propertyName": "Down",
"ccVersion": 2,
"metadata": {
"type": "boolean",
"readable": false,
"writeable": true,
"label": "Perform a level change (Down)",
"ccSpecific": {
"switchType": 2
},
"valueChangeOptions": [
"transitionDuration"
],
"states": {
"true": "Start",
"false": "Stop"
},
"stateful": true,
"secret": false
}
},
For my device, there are two values, 2-38-0-Up
and 2-38-0-Down
for either direction of a level change. The property fields are Up/Down
, but these could also be Off/On
, Close/Open
, etc depending on the device. However, the driver accepts any of these despite the names. So it should be safe to just use “Up” and “Down” for property if you want. To start and stop level changes you use boolean values true
and false
.
service: zwave_js.set_value
data:
command_class: "38"
endpoint: 0
property: Up # or Down for other direction
value: true # or false to stop
If you need more control over the options for startLevelChange, then you’ll need to use service zwave_js.invoke_cc_api
instead, with startLevelChange
API. The only option available for the value API is duration
.