Z-Wave value updated
The Z-Wave value updated trigger fires when a Z-Wave value changes on a node. Use it to react to value changes that Home Assistant does not expose as a regular entity state, or to watch a specific Command Class value directly.
This trigger is useful when:
- You want to act on a Z-Wave value that is not represented by a Home Assistant entity.
- A device sends value updates without changing entity state, for example, when the device does not follow the Z-Wave specification.
- You need to filter on a specific Command Class, property, property key, or endpoint.
This trigger is configured in YAML only. It cannot be added from the automation editor in the UI.
Using this trigger 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 trigger as zwave_js.value_updated. A basic example looks like this:
trigger: zwave_js.value_updated
entity_id: lock.front_lock
command_class: 98
property: "latchStatus"
to: "opened"
This fires whenever the latchStatus value of the Door Lock Command Class on the front lock changes to opened.
Options in YAML
At least one of device_id or entity_id is required. The command_class and property fields are required to identify the Z-Wave value to watch.
One or more device IDs of Z-Wave devices to watch. At least one of device_id or entity_id must be set.
One or more entity IDs whose devices should be watched. At least one of device_id or entity_id must be set.
One previous value or a list of previous values to match against. The trigger fires when the previous value matches any of the listed values.
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.
- When
fromortois a list, the trigger fires if the value matches any item in the list. - This trigger does not appear in the automation editor in the UI. You can add it by editing the automation in YAML mode.
Available trigger data
In addition to the standard automation trigger data, this trigger exposes the following template variables:
-
trigger.device_id: Device ID for the device in the device registry. -
trigger.node_id: Z-Wave node ID. -
trigger.command_class: Command Class ID. -
trigger.command_class_name: Command Class name. -
trigger.property: Z-Wave value’s property. -
trigger.property_name: Z-Wave value’s property name. -
trigger.property_key: Z-Wave value’s property key. -
trigger.property_key_name: Z-Wave value’s property key name. -
trigger.endpoint: Z-Wave value’s endpoint. -
trigger.previous_value: The previous value (translated to a state name when possible). -
trigger.previous_value_raw: The raw previous value. -
trigger.current_value: The current value (translated to a state name when possible). -
trigger.current_value_raw: The raw current value.
More examples
Real scenarios where this trigger fires in automations and scripts. 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: refresh related switches when a relay reports a value update
Some devices report value updates without a corresponding state change. This automation refreshes related switches when the in-wall dual relay switch reports a currentValue update.
-
Trigger: Z-Wave value updated
-
Entity:
switch.in_wall_dual_relay_switch -
Command Class:
37(Switch Binary) -
Property:
currentValue
-
Entity:
-
Action: Z-Wave refresh value
- Targets: the related switches
YAML example for refreshing related switches
alias: "Refresh related switches on value update"
triggers:
- trigger: zwave_js.value_updated
entity_id: switch.in_wall_dual_relay_switch
command_class: 37
property: "currentValue"
actions:
- action: zwave_js.refresh_value
data:
entity_id:
- switch.in_wall_dual_relay_switch_2
- switch.in_wall_dual_relay_switch_3
Automation: react when a door lock latch opens
This automation fires whenever the latchStatus value of one of the listed locks changes from closed or jammed to opened.
-
Trigger: Z-Wave value updated
- Device: Garage Door Lock
-
Entities:
lock.front_lock,lock.back_door -
Command Class:
98(Door Lock) -
Property:
latchStatus -
From:
closed,jammed -
To:
opened
- Action: Send a notification
YAML example for reacting to a latch opening
alias: "Notify when a lock latch opens"
triggers:
- trigger: zwave_js.value_updated
device_id: 45d7d3230dbb7441473ec883dab294d4
entity_id:
- lock.front_lock
- lock.back_door
command_class: 98
property: "latchStatus"
property_key: null
endpoint: 0
from:
- "closed"
- "jammed"
to: "opened"
actions:
- action: notify.send_message
target:
entity_id: notify.my_device
data:
message: "A lock latch was opened."
Still stuck?
The Home Assistant community is quick to help: join Discord for real-time chat, post on the community forum with the trigger 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 triggers or suggest the right one when you describe what you want in plain language.
Related triggers
These triggers work well alongside this one:
-
Z-Wave event: Triggers on Z-Wave JS controller, driver, or node events, including events that are not handled by Home Assistant automatically.
-
State: Triggers when the state or an attribute changes.