Z-Wave JS value
The Z-Wave JS value condition passes when a Z-Wave value on the selected nodes equals the value you specify. Use it to check a Command Class value directly, including values that Home Assistant does not expose as an entity.
This condition is the counterpart of the Z-Wave value updated trigger. Where that trigger fires on a change, this condition tests the current value.
This condition is useful when:
- You want to check a Z-Wave value that has no Home Assistant entity.
- You want to test a specific Command Class, property, property key, or endpoint.
- A device reports detail in a value that its entity state flattens away.
Using this condition from the user interface
If you prefer building automations visually, Home Assistant walks you through this condition step by step. You pick what to check, tweak a few options, and save. No YAML knowledge required.
To use Z-Wave JS value in an automation:
- Go to Settings > Automations & scenes.
- Open an existing automation, or select Create automation > Create new automation.
- In the And if section, select Add condition.
- Search for Z-Wave JS value and select it.
- Under Devices (see Selecting nodes), pick the Z-Wave devices whose nodes you want to check.
- Under Command class, pick the Command Class of the value.
- Under Property, enter the property of the value, and under Value, enter the value to compare with.
- Optionally set Property key and Endpoint.
- Under Condition passes if (see Behavior with multiple nodes), choose how multiple nodes should combine. The default is Any.
- Select Save.
Options in the UI
Using this condition in YAML
If you work directly in YAML, or you want to know exactly what Home Assistant does under the hood, this section has the technical reference. It lists the field names you use in YAML, their types, and which ones are required.
In YAML, refer to this condition as zwave_js.value. A basic example looks like this:
condition: zwave_js.value
options:
device_id: 45d7d3230dbb7441473ec883dab294d4
command_class: 98
property: currentMode
value: "Unsecured"
This passes when the Door Lock Command Class reports the lock as unsecured.
To require every listed node to match, and to select a value that has a property key and an endpoint:
condition: zwave_js.value
options:
device_id:
- 45d7d3230dbb7441473ec883dab294d4
- 8f4219cfa57e23f6f669c4616c2205e2
command_class: 51
property: currentColor
property_key: 0
endpoint: 0
value: 255
behavior: all
Options in YAML
The value to compare with, either the raw value or its state label.
Selecting nodes
A Z-Wave node is represented in Home Assistant as a device, so this condition selects nodes with a device picker rather than a target. Pick one or more Z-Wave devices, and the condition tests the node behind each one.
Behavior with multiple nodes
When you select more than one device, the Condition passes if option controls how the results combine:
- Any (default): the condition passes if at least one node’s value matches.
- All: the condition passes only when every node’s value matches.
Good to know
- Property names, property keys, and Command Class IDs come from Z-Wave JS. Refer to the Z-Wave JS documentation for the available values.
- A value with named states can be compared either by its raw value or by its state label, for example
0or"Unsecured". The raw value written as a string, such as"0", also matches. - A property key of
0is a real key, for example a Color Switch component, and is not the same as leaving the property key out. - The condition is rejected when it is saved if none of the selected nodes has the value at all, so a typo in the Command Class or property surfaces immediately rather than silently never passing.
- A node that does have the value but with a different reading simply does not match.
- The condition does not pass when none of the selected devices resolve to a Z-Wave node. A device that no longer resolves counts as unresolved and makes All fail.
Try it yourself
Ready to test this? Go to Settings > Automations & scenes, open an automation, and add this condition. Trigger the automation with and without the condition met, and watch whether it continues or stops.
More examples
Real scenarios where this condition gates an automation. Copy any example and adapt it to your setup.
You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the automation editor in Home Assistant, and press Ctrl+V (or Cmd+V on Mac). Home Assistant automatically converts the pasted YAML into the visual editor format, whether it’s a full automation, a single trigger, a condition, or an action.
Automation: only close the garage if the latch reports closed
- Trigger: Time: 23:00
-
Condition: Z-Wave JS value
- Devices: Garage door lock
- Command class: 98 (Door Lock)
- Property: latchStatus
- Value: closed
- Action: Send a notification message
YAML example for checking a Z-Wave value
alias: "Confirm the latch is closed at night"
triggers:
- trigger: time
at: "23:00:00"
conditions:
- condition: zwave_js.value
options:
device_id: 45d7d3230dbb7441473ec883dab294d4
command_class: 98
property: latchStatus
value: "closed"
actions:
- action: notify.send_message
target:
entity_id: notify.my_device
data:
message: "The front door latch is closed for the night."
Still stuck?
The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the condition you’re using and what you expected to happen, or share on our subreddit /r/homeassistant.
AI assistants like ChatGPT or Claude can also explain conditions or suggest the right one when you describe what you want in plain language.
Related conditions
Explore related conditions:
-
Z-Wave JS configuration parameter: Tests if a configuration parameter on one or more Z-Wave JS nodes has the given value.
-
Z-Wave JS node status: Tests if one or more Z-Wave JS nodes have the given status.