Zooz ZEN72

I’m new to this. I have used your zen32 blueprint without any issues.
This zen72 is throwing Error: UndefinedError: ‘dict object’ has no attribute ‘event’.
I’ve searched and cannot find anything that helps.
Any idea what I’m doing wrong?

Thanks in advance for this and your other blueprints.

I was having similar issues with a Zooz Zen 77. For me - I was getting that same error when I ran the automation through the automation panel - clicking on ‘run actions’. Checking the trace screen would give me that same error. BUT. When I finally got off of my butt and ran it at the switch (ie. up click twice on the switch) it worked and the tracing was fine. ymmv

Did you ever resolve this? I am having the same issue. FWIW, I am triggering the event from the switch.

To all those having issues @millerstevew and @LarsenTech.

‘dict object’ has no attribute ‘event’ means that there is no ‘sensor’ attribute in the json payload.

Please post your actual automation yaml and action trace. What is showing up in the event log listening for “zwave_js_value_notification” events?

Just set this up and receiving same message. Automations yaml is here:

id: '1633828454852'
  alias: Master Bath Light
  description: ''
  use_blueprint:
    path: ZOOZ/ZEN72.yaml
    input:
      zooz_zen72: 86068a09a856d4f0439e590f7bde1f83
      dimmer_up_1x:
      - type: turn_on
        device_id: 86068a09a856d4f0439e590f7bde1f83
        entity_id: light.master_bath_light
        domain: light
        brightness_pct: 100
      dimmer_up_2x:
      - type: turn_on
        device_id: 86068a09a856d4f0439e590f7bde1f83
        entity_id: light.master_bath_light
        domain: light
        brightness_pct: 8
      dimmer_down_1x:
      - type: turn_off
        device_id: 86068a09a856d4f0439e590f7bde1f83
        entity_id: light.master_bath_light
        domain: light

Here is the trace:

{
  "trace": {
    "last_step": "action/0",
    "run_id": "3",
    "state": "stopped",
    "script_execution": "error",
    "timestamp": {
      "start": "2021-10-10T16:13:54.914348+00:00",
      "finish": "2021-10-10T16:13:54.942768+00:00"
    },
    "domain": "automation",
    "item_id": "1633828454852",
    "error": "UndefinedError: 'dict object' has no attribute 'event'",
    "trigger": null,
    "trace": {
      "trigger": [
        {
          "path": "trigger",
          "timestamp": "2021-10-10T16:13:54.914577+00:00",
          "changed_variables": {
            "this": {
              "entity_id": "automation.master_bath_light",
              "state": "on",
              "attributes": {
                "last_triggered": "2021-10-10T16:07:46.321695+00:00",
                "mode": "single",
                "current": 0,
                "id": "1633828454852",
                "friendly_name": "Master Bath Light"
              },
              "last_changed": "2021-10-10T16:07:40.998037+00:00",
              "last_updated": "2021-10-10T16:07:46.335960+00:00",
              "context": {
                "id": "af557e4b62593e7ef5dca8806f0fedca",
                "parent_id": "96e7c86f7faecefef1e3f51558578317",
                "user_id": null
              }
            },
            "trigger": {
              "platform": null
            }
          }
        }
      ],
      "action/0": [
        {
          "path": "action/0",
          "timestamp": "2021-10-10T16:13:54.917844+00:00",
          "changed_variables": {
            "context": {
              "id": "96d630d639f0ef037dfe51be2e67d0fc",
              "parent_id": "c26c521aae8a4233ed1502384d281d3f",
              "user_id": null
            }
          },
          "error": "UndefinedError: 'dict object' has no attribute 'event'"
        }
      ]
    },
    "config": {
      "mode": "single",
      "max_exceeded": "silent",
      "trigger": [
        {
          "platform": "event",
          "event_type": "zwave_js_value_notification",
          "event_data": {
            "command_class_name": "Central Scene",
            "device_id": "86068a09a856d4f0439e590f7bde1f83"
          }
        }
      ],
      "action": [
        {
          "variables": {
            "scene_id": "{{ trigger.event.data.label }}",
            "attribute_id": "{{ trigger.event.data.value }}"
          }
        },
        {
          "choose": [
            {
              "conditions": "{{ scene_id == 'Scene 001' }}",
              "sequence": [
                {
                  "choose": [
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed' }}",
                      "sequence": [
                        {
                          "type": "turn_on",
                          "device_id": "86068a09a856d4f0439e590f7bde1f83",
                          "entity_id": "light.master_bath_light",
                          "domain": "light",
                          "brightness_pct": 100
                        }
                      ]
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed2x' }}",
                      "sequence": [
                        {
                          "type": "turn_on",
                          "device_id": "86068a09a856d4f0439e590f7bde1f83",
                          "entity_id": "light.master_bath_light",
                          "domain": "light",
                          "brightness_pct": 8
                        }
                      ]
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed4x' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed5x' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyHeldDown' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyReleased' }}",
                      "sequence": []
                    }
                  ]
                }
              ]
            },
            {
              "conditions": "{{ scene_id == 'Scene 002' }}",
              "sequence": [
                {
                  "choose": [
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed' }}",
                      "sequence": [
                        {
                          "type": "turn_off",
                          "device_id": "86068a09a856d4f0439e590f7bde1f83",
                          "entity_id": "light.master_bath_light",
                          "domain": "light"
                        }
                      ]
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed2x' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed4x' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyPressed5x' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyHeldDown' }}",
                      "sequence": []
                    },
                    {
                      "conditions": "{{ attribute_id == 'KeyReleased' }}",
                      "sequence": []
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "id": "1633828454852",
      "alias": "Master Bath Light",
      "description": ""
    },
    "blueprint_inputs": {
      "id": "1633828454852",
      "alias": "Master Bath Light",
      "description": "",
      "use_blueprint": {
        "path": "ZOOZ/ZEN72.yaml",
        "input": {
          "zooz_zen72": "86068a09a856d4f0439e590f7bde1f83",
          "dimmer_up_1x": [
            {
              "type": "turn_on",
              "device_id": "86068a09a856d4f0439e590f7bde1f83",
              "entity_id": "light.master_bath_light",
              "domain": "light",
              "brightness_pct": 100
            }
          ],
          "dimmer_up_2x": [
            {
              "type": "turn_on",
              "device_id": "86068a09a856d4f0439e590f7bde1f83",
              "entity_id": "light.master_bath_light",
              "domain": "light",
              "brightness_pct": 8
            }
          ],
          "dimmer_down_1x": [
            {
              "type": "turn_off",
              "device_id": "86068a09a856d4f0439e590f7bde1f83",
              "entity_id": "light.master_bath_light",
              "domain": "light"
            }
          ]
        }
      }
    },
    "context": {
      "id": "96d630d639f0ef037dfe51be2e67d0fc",
      "parent_id": "c26c521aae8a4233ed1502384d281d3f",
      "user_id": null
    }
  },
  "logbookEntries": [
    {
      "name": "Master Bath Light",
      "message": "has been triggered",
      "source": null,
      "entity_id": "automation.master_bath_light",
      "context_id": "96d630d639f0ef037dfe51be2e67d0fc",
      "when": "2021-10-10T16:13:54.915086+00:00",
      "domain": "automation"
    }
  ]
}

@dheat , @LarsenTech and @millerstevew , the issue is actually not the automation but the default configuration of the switch. The Zen72 by default has scene control disabled. As such, your double tap events don’t fire a central scene event.

In the config for the switch, set Scene Control to Enable and try again. It should work.

@IOT_Ninja , might be worth adding a comment to the main post about this.

2 Likes

@IOT_Ninja can this be expanded to support the Zooz ZEN74? It is essentially the same switch in toggle format instead of paddles. Best I can tell it has identical functionality. I created my own blueprint to do this but would be nice to just have one unified blueprint for this purpose.

1 Like

I can edit and re-upload as a separate BP later to address the specific case of the ZEN74 since it uses the same scene/attribute values as the ZEN72. Unfortunately, I don’t think HA BPs allow for multiple model selectors (per this feature request), and removing the model restriction could result in issues if a user tried to use the wrong BP with on a similar Zooz product.

1 Like

Ok, that makes sense. I’ll just use my own local copy, works well enough for me! Thanks for making this.

Thanks! I adapted this for my zen77.
I am hoping to have the switch operate (through z-wave) like a normal up/down dimmer and increase/decrease brightness when the light is on and the up/down is held. What can be used for loop conditions to facilitate this?

No additional settings should be needed. Standard press-and-hold dimming is the default out of the box.

I can’t get it to work out of the box when the switch is in smart bulb mode. It doesn’t do anything when I hold.

I can get it to dim a step/percentage by using call service - dim, but can’t get it to loop continuously if I hold the switch. Just one step. Then if I release and hold it will do another step.

Any suggestions?

I’m having the same problem except I’m not calling a service. I’m using the increase/decrease brightness device attribute. Everything works great except when I hold the up or down paddle, it will only move brightness one step.

@doomi I think i found a fix for the dimming. I had to turn slowRefresh off in the central scene section of the zwave options. Seems to be working now. Hope this helps.

@ajb004 Very interesting! I’m not seeing that option. Are you using mqtt or zwave JS?

@doomi I’m using zwave2mqtt running in a container on a raspberry pi with a Zooz Zwave adapter. I don’t use MQTT though, I use the Web Socket Server

@ajb004 I finally had a chance to move everything over to mqtt and this worked. Just wanted to say thank you for your guidance.

1 Like

I’m also trying to setup the up/down dimmer when up/down is held. I tried adding a Repeat action to the “Bottom Paddle Hold” option that would keep going until the button was released (by listening to the “KeyReleased” event…based this on this post: Integrate Zooz ZEN34 with Home Assistant – PCB Isolation). Here’s the relevant YAML for the “Bottom Paddle Hold” action that I created:

repeat:
  until:
    - condition: device
      device_id: 8110xxxxxxxxxxxxxxxxxxxxxxxxxxxx
      domain: zwave_js
      type: value
      command_class: 91
      property: scene
      property_key: "002"
      value: KeyReleased
  sequence:
    - service: light.turn_on
      data:
        brightness_step_pct: -10
      target:
        entity_id: light.living_room_recessed_lights_group
    - delay:
        hours: 0
        minutes: 0
        seconds: 0
        milliseconds: 500

But I kept getting this error:

Value 24-91-0-Scene 001 can't be found on node Node(node_id=24). Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0x7f6a9c17c4c0>

Here’s the full error:

Blueprint Zooz ZEN72 generated invalid automation with inputs OrderedDict([('zooz_zen72', '8110xxxxxxxxxxxxxxxxxxxxxxxxxxxx'), ('dimmer_up_1x', [OrderedDict([('service', 'light.turn_on'), ('data', OrderedDict()), ('target', OrderedDict([('entity_id', 'light.living_room_recessed_lights_group')]))])]), ('dimmer_down_1x', [OrderedDict([('service', 'light.turn_off'), ('data', OrderedDict()), ('target', OrderedDict([('entity_id', 'light.living_room_recessed_lights_group')]))])]), ('dimmer_down_hold', [OrderedDict([('repeat', OrderedDict([('while', [OrderedDict([('condition', 'device'), ('device_id', '8110xxxxxxxxxxxxxxxxxxxxxxxxxxxx'), ('domain', 'zwave_js'), ('type', 'value'), ('command_class', 91), ('property', 'Scene 001'), ('value', 'KeyReleased')])]), ('sequence', [OrderedDict([('service', 'light.turn_on'), ('data', OrderedDict([('brightness_step_pct', -10)])), ('target', OrderedDict([('entity_id', 'light.living_room_recessed_lights_group')]))])])]))])]), ('dimmer_down_2x', [OrderedDict([('service', 'homeassistant.turn_off'), ('data', OrderedDict()), ('target', OrderedDict([('entity_id', 'switch.adaptive_lighting_living_room')]))])]), ('dimmer_up_2x', [OrderedDict([('service', 'homeassistant.turn_on'), ('data', OrderedDict()), ('target', OrderedDict([('entity_id', 'switch.adaptive_lighting_living_room')]))])]), ('dimmer_down_release', [])]): Value 24-91-0-Scene 001 can't be found on node Node(node_id=24). Got <homeassistant.components.blueprint.models.BlueprintInputs object at 0x7f6a9c17c4c0>

I think this should work, right? But I can’t figure out what the issue is that is causing the error.

Can you go to dev tools, listen to zwave_js_value_notification events, and provide the full output?

I’m guessing that Zooz may have changed the configuration of that switch so that both the value and value_raw return the integer/string corresponding to the scene value (ie, 00 for both, vs my bp that is based on value = KeyPressed)

Yup, you guessed right. I upgraded my ZEN72 and ZEN32 switches to firmware 10.30 and noticed my automations stopped working. After spending hours troubleshooting, I discovered value now mirrors value_raw.

Here is a sample event:

event_type: zwave_js_value_notification
data:
  domain: zwave_js
  node_id: 13
  home_id: 4232454107
  endpoint: 0
  device_id: 322f2a2ecb4e24aa8b5c8ad6794758dd
  command_class: 91
  command_class_name: Central Scene
  label: Scene 002
  property: scene
  property_name: scene
  property_key: "002"
  property_key_name: "002"
  value: 0
  value_raw: 0
origin: LOCAL
time_fired: "2022-11-24T02:56:11.787964+00:00"
context:
  id: 01GJKS0W0B97SJRADR5NS3A0W3
  parent_id: null
  user_id: null