Zwave_js_value_notification after upgrade

I just got a new Hank 4 button controller, I got everything working the way I wanted by keying off of the action_name field and scene_id I can fire diferent automations for single vs hold events. I foolishly then decided to upgrade Home Assistant and my automations no longer work. I noticed when looking at the zwave_js_value_notification event that the action_name field is no longer there.

I could probably change my automation to trigger off of the value field, 1 seems to be single press, 2, hold, 3 release. But I am wondering what has changed.

event_type: zwave_js_value_notification
data:
  domain: zwave_js
  node_id: 12
  home_id: 3674734580
  endpoint: 0
  device_id: d48cb0cda28de88a8f0be0fa57b6dba3
  command_class: 91
  command_class_name: Central Scene
  label: Scene 003
  property: scene
  property_name: scene
  property_key: "003"
  property_key_name: "003"
  value: 1
  value_raw: 1
origin: LOCAL
time_fired: "2022-10-08T23:36:01.054738+00:00"
context:
  id: 01GEWZ98RYTJ19YHPQM5A3J4MK
  parent_id: null
  user_id: null

I cannot recall there ever being “action_name” or “scene_id” fields for that event. Do you have an example of that? In this example, the value value looks incorrect, it should be the string "KeyReleased" in your example. https://www.home-assistant.io/integrations/zwave_js/#scene-events-value-notification

You might try a re-interview, maybe there was an error, or see what’s reported in the driver debug logs.

Sorry I had the wrong values names I forgot I got them from a variable in my blueprint.

  scene_id: '{{ trigger.event.data.property_key }}'
  action_name: '{{ trigger.event.data.value }}'

So what I am seeing is data.value populated with a number rather then KeyPressed or KeyHeldDown

You can download the Device diagnostic file and see what is listed for the Central Scene metadata. If it doesn’t show those strings, I would try a re-interview.

You could also switch to using the value_raw field which would be resilient to any kind of metadata issues. This is the mapping of strings to raw values:

export enum CentralSceneKeys {
	KeyPressed = 0x00,
	KeyReleased = 0x01,
	KeyHeldDown = 0x02,
	KeyPressed2x = 0x03,
	KeyPressed3x = 0x04,
	KeyPressed4x = 0x05,
	KeyPressed5x = 0x06,
}

Where do I find this in zwaveJS?

I ended up switching to the raw values, but would love to know more about how this happened.

Look in the Device diagnostic file (from the device page). If the metadata is missing, then likely an interview error. You’d have to look in past logs to see that. If you’re using the core add-on, then there are no past logs.

Reinterview solved the problem. I am going to leave my autoamtion on value_raw though so I don’t have to worry about it