Zooz ZEN32 Automation

Not sure if this is possible, but I just can’t seem get on tract with this. I am trying to make each of the scene buttons as toggle for the bathroom exhaust fan. I tried using the blueprint for the ZEN32, but it doesn’t work.

I am trying to make each scene button as a timer for the exhaust fan. So scene button 1 will turn on the fan for 5 minutes, button 2 for 15 minutes, button 3 for 30 minutes and button 4 for 60 minutes. The blueprint does make it work, but I am trying to make the same button to turn off the exhaust fan, essentially toggling the exhaust fan. This is useful if I hit one of the scene button by accident.

The z-wave notification gives me results below. How can I use these results to make an automation for each scene button?

Event 3 fired 8:11 PM:
{
    "event_type": "zwave_js_value_notification",
    "data": {
        "domain": "zwave_js",
        "node_id": 40,
        "home_id": 3825337401,
        "endpoint": 0,
        "device_id": "ca036dede8d0fcd97ec84a19a23a0a61",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 004",
        "property": "scene",
        "property_name": "scene",
        "property_key": "004",
        "property_key_name": "004",
        "value": "KeyPressed",
        "value_raw": 0
    },
    "origin": "LOCAL",
    "time_fired": "2022-03-14T00:11:47.072933+00:00",
    "context": {
        "id": "7d1fd5b5107aa22d481b61628473d7f9",
        "parent_id": null,
        "user_id": null
    }
}
Event 2 fired 8:11 PM:
{
    "event_type": "zwave_js_value_notification",
    "data": {
        "domain": "zwave_js",
        "node_id": 40,
        "home_id": 3825337401,
        "endpoint": 0,
        "device_id": "ca036dede8d0fcd97ec84a19a23a0a61",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 003",
        "property": "scene",
        "property_name": "scene",
        "property_key": "003",
        "property_key_name": "003",
        "value": "KeyPressed",
        "value_raw": 0
    },
    "origin": "LOCAL",
    "time_fired": "2022-03-14T00:11:46.059725+00:00",
    "context": {
        "id": "f6a7dd6bc5e3822d5f606d4af1ccb6e0",
        "parent_id": null,
        "user_id": null
    }
}
Event 1 fired 8:11 PM:
{
    "event_type": "zwave_js_value_notification",
    "data": {
        "domain": "zwave_js",
        "node_id": 40,
        "home_id": 3825337401,
        "endpoint": 0,
        "device_id": "ca036dede8d0fcd97ec84a19a23a0a61",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 002",
        "property": "scene",
        "property_name": "scene",
        "property_key": "002",
        "property_key_name": "002",
        "value": "KeyPressed",
        "value_raw": 0
    },
    "origin": "LOCAL",
    "time_fired": "2022-03-14T00:11:44.922564+00:00",
    "context": {
        "id": "cc1d452fea7c06bafc9b52c24e185587",
        "parent_id": null,
        "user_id": null
    }
}
Event 0 fired 8:11 PM:
{
    "event_type": "zwave_js_value_notification",
    "data": {
        "domain": "zwave_js",
        "node_id": 40,
        "home_id": 3825337401,
        "endpoint": 0,
        "device_id": "ca036dede8d0fcd97ec84a19a23a0a61",
        "command_class": 91,
        "command_class_name": "Central Scene",
        "label": "Scene 001",
        "property": "scene",
        "property_name": "scene",
        "property_key": "001",
        "property_key_name": "001",
        "value": "KeyPressed",
        "value_raw": 0
    },
    "origin": "LOCAL",
    "time_fired": "2022-03-14T00:11:43.624287+00:00",
    "context": {
        "id": "f5bf7d0905188d69616b8979bb16add1",
        "parent_id": null,
        "user_id": null
    }
}

If I understand right, what you want is for each button press to be a Choose action, with conditions for whether or not the fan is on or not.

This specific thing may actually be easier to implement just as an automation, not using the blueprint, because if the fan is on, you want the same action for all four buttons (turn it off!) and if the fan is off, you also want basically the same sequence of actions — turn it on, wait (amount based on trigger), turn off.

And, I’m not sure what the blueprint is configured for, but you almost certainly want the automation to be “Restart” mode, or you’ll get some weirdness.

Yes. That’s exactly what I am trying to do. I’ll try to use the Choose function. Although I never used it before.

I am sure I am doing this wrong, but this is what I have:

- id: '1647218436361'
  alias: Fist Floor Bathroom 5 Minute Timer
  description: ''
  trigger:
  - platform: device
    device_id: ca036dede8d0fcd97ec84a19a23a0a61
    domain: zwave_js
    type: event.value_notification.central_scene
    property: scene
    property_key: '001'
    endpoint: 0
    command_class: 91
    subtype: Endpoint 0 Scene 001
    value: 0
  condition:
  - condition: device
    type: is_off
    device_id: 4c1d7a68b9326b638807ff654a07d867
    entity_id: switch.first_floor_bathroom_fan
    domain: switch
  action:
  - type: toggle
    device_id: 4c1d7a68b9326b638807ff654a07d867
    entity_id: switch.first_floor_bathroom_fan
    domain: switch
  - delay:
      hours: 0
      minutes: 0
      seconds: 30
      milliseconds: 0
  mode: restart