Z-Wave JS value updated

The Z-Wave JS 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.

Using this trigger from the user interface

If you prefer building automations visually, Home Assistant walks you through this trigger step by step. You pick what to watch, tweak a few options, and save. No YAML knowledge required.

To use Z-Wave JS value updated in an automation:

  1. Go to Settings > Automations & scenes.
  2. Open an existing automation, or select Create automation > Create new automation.
  3. In the When section, select Add trigger.
  4. Search for Z-Wave JS value updated and select it.
  5. Pick the nodes to watch under Devices, Entities, or both.
  6. Under Command class, pick the Command Class of the value, and under Property, enter its property.
  7. Optionally set Property key and Endpoint to narrow down which value is meant.
  8. Optionally set From and To to only fire on specific previous or new values.
  9. Select Save.

Options in the UI

Devices

The Z-Wave devices whose values to watch.

Entities

Entities whose devices should be watched.

Command class

The Command Class of the Z-Wave value to watch.

Property

The property of the Z-Wave value to watch.

Property key

The property key of the Z-Wave value, for values that have one.

Endpoint

The endpoint of the Z-Wave value.

From

One previous value, or a list of them. The trigger fires when the previous value matches any of them.

To

One new value, or a list of them. The trigger fires when the new value matches any of them.

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:

TriggerA trigger is the part of an automation that makes the automation start when something specific happens, for example, when the sun sets, a door opens, or a button is pressed. [Learn more]
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.

trigger string Required

The trigger type. For this trigger, use zwave_js.value_updated.

device_id string | list (Optional)

One or more device IDs of Z-Wave devices to watch. At least one of device_id or entity_id must be set.

entity_id string | list (Optional)

One or more entity IDs whose devices should be watched. At least one of device_id or entity_id must be set.

command_class integer Required

The numeric ID of the Command Class of the Z-Wave value to watch.

property string | integer Required

The property of the Z-Wave value to watch.

property_key string | integer (Optional)

The property key of the Z-Wave value to watch.

endpoint integer (Optional)

The endpoint of the Z-Wave value to watch.

from string | integer | list (Optional)

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.

to string | integer | list (Optional)

One new value or a list of new values to match against. The trigger fires when the new 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 from or to is a list, the trigger fires if the value matches any item in the list.
  • At least one of Devices or Entities is required, and an entity is resolved to the node behind it.

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. In the visual editor, select the UI options listed in the example when they are available, or paste the YAML code.

Tip

You don’t need to edit YAML to use these examples. Copy a YAML snippet from this page, open the visual 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 JS value updated
    • Entity: switch.in_wall_dual_relay_switch
    • Command Class: 37 (Switch Binary)
    • Property: currentValue
  • Action: Refresh values
    • Targets: the related switches
YAML example for refreshing related switches
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
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 JS 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 message
YAML example for reacting to a latch opening
AutomationAutomations in Home Assistant allow you to automatically respond to things that happen in and around your home. [Learn more]
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.

Tip

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

Explore related triggers:

  • Z-Wave JS event received: Triggers on Z-Wave JS controller, driver, or node events, including events that are not handled by Home Assistant automatically.

  • State changed: Triggers when the state or an attribute changes.