Zooz ZEN32 Control and Track all in one

Thanks!

Here’s the version that doesn’t work.

yaml
alias: ZEN32 - Front Scones - State Tracking3
description: ""
use_blueprint:
  path: rwalker777/ZEN32-control-track.yaml
  input:
    input_entity4: binary_sensor.thuja_power_sensor_binary
    zooz_switch: 0b23ab7176ca1930b280979ce098d308
    track_relay0: "1"
    scene_1:
      - choose:
          - conditions:
              - condition: state
                entity_id: light.kitchen_cans
                state: "on"
            sequence:
              - service: light.turn_off
                metadata: {}
                data:
                  transition: 1
                target:
                  entity_id: light.kitchen_cans
          - conditions:
              - condition: state
                entity_id: light.kitchen_cans
                state: "off"
            sequence:
              - service: adaptive_lighting.apply
                data:
                  lights:
                    - light.kitchen_cans
                  transition: "1"
                  adapt_brightness: true
                  turn_on_lights: true
                  entity_id: switch.adaptive_lighting_adapt_brightness_living_room
    input_entity2: binary_sensor.pc1_power_sensor_binary
    off_state2: "2"
    off_state4: "2"
    scene_4:
      - service: input_button.press
        metadata: {}
        data: {}
        target:
          entity_id: input_button.wake_pc2
    scene_2:
      - service: input_button.press
        metadata: {}
        data: {}
        target:
          entity_id: input_button.wake_pc1
    input_entity3: alarm_control_panel.alarm_control_panel
    on_color3: "3"
    scene_3:
      - service: script.button_down_the_house
        metadata: {}
        data: {}
    unavail_color3: "5"
    unavail_color4: "5"
    unavail_color2: "5"
    p24_relay_scene_control: "1"
    input_entity0: light.front_sconces
    off_state0: "2"
    off_state1: "2"
    on_state1: "2"
    unavail_state1: "2"
    off_state3: "3"
    on_brightness2: "2"
    on_brightness3: "2"
    on_brightness4: "2"
    scene_43:
      - service: script.lan_hibernate_pc1
        metadata: {}
        data: {}
    scene_42:
      - service: script.back_office_heat_on
        metadata: {}
        data: {}
    scene_22:
      - service: script.front_office_heat_on
        metadata: {}
        data: {}
    scene_23:
      - service: automation.trigger
        metadata: {}
        data:
          skip_condition: true
        target:
          entity_id: automation.lan_hibernate_pc2

This version works.

YAML
alias: ZEN32 - Front Scones - State Tracking3
description: ""
use_blueprint:
  path: rwalker777/ZEN32-control-track.yaml
  input:
    input_entity4: binary_sensor.thuja_power_sensor_binary
    zooz_switch: 0b23ab7176ca1930b280979ce098d308
    track_relay0: "1"
    scene_1:
      - choose:
          - conditions:
              - condition: state
                entity_id: light.kitchen_cans
                state: "on"
            sequence:
              - service: light.turn_off
                metadata: {}
                data:
                  transition: 1
                target:
                  entity_id: light.kitchen_cans
          - conditions:
              - condition: state
                entity_id: light.kitchen_cans
                state: "off"
            sequence:
              - service: adaptive_lighting.apply
                data:
                  lights:
                    - light.kitchen_cans
                  transition: "1"
                  adapt_brightness: true
                  turn_on_lights: true
                  entity_id: switch.adaptive_lighting_adapt_brightness_living_room
    input_entity2: binary_sensor.acer_power_sensor_binary
    off_state2: "2"
    off_state4: "2"
    scene_4:
      - service: input_button.press
        metadata: {}
        data: {}
        target:
          entity_id: input_button.wake_thuja
    scene_2:
      - service: input_button.press
        metadata: {}
        data: {}
        target:
          entity_id: input_button.wake_acer
    input_entity3: alarm_control_panel.alarm_control_panel
    on_color3: "3"
    scene_3:
      - service: script.button_down_the_house
        metadata: {}
        data: {}
    unavail_color3: "5"
    unavail_color4: "5"
    unavail_color2: "5"
    p24_relay_scene_control: "1"
    input_entity0: light.front_sconces
    off_state0: "2"
    off_state1: "2"
    on_state1: "2"
    unavail_state1: "2"
    off_state3: "3"
    on_brightness2: "2"
    on_brightness3: "2"
    on_brightness4: "2"
    scene_43:
      - service: script.lan_hibernate_thuja
        metadata: {}
        data: {}
    scene_42:
      - service: script.back_office_heat_on
        metadata: {}
        data: {}
    scene_22:
      - service: script.front_office_heat_on
        metadata: {}
        data: {}
    scene_23:
      - service: automation.trigger
        metadata: {}
        data:
          skip_condition: true
        target:
          entity_id: automation.lan_hibernate_acer
    input_entity1: light.kitchen_cans

Only change I made is light.kitchen_cans in the entity box for top left.

@rwalker tested it out. Really like the new layout of moving the multi button press under the main switch but collapsed is a great idea. Same as putting the parameter control in the blueprint itself.

The night time settings does not seem to work fully, when they are enabled it does not turn the on LEDs off which is great. But when you turn them off they control the entity and flash then stay the on colour. Once the nighttime is disable it goes back to turning the led to white when it is off. I think its similar to the result i posted here and you fixed.

But the over all idea and execution of the night light is perfect.

1 Like

Yeah, i see the issue. I need to give up on the track entity lookup from the scene. Give me some time to fix and update.

1 Like

2024.6.6 fixes the nighttime as well as removes the entity scene lookup. Let me know if anyone has any issues.

1 Like

@rwalker With 2024.6.6 I cant really get the LEDs to change at all. They wont turn off for nighttime, and they wouldn’t change colour any more. If I tracked the entity for the on off state in the separate field that did get them to change (wasn’t tracking before) but then they would not go back to their off state.

You HAVE to define the track entity for each button, it won’t extract it from the scene.

So with it set, the on state would process, but off state would not? Is that on every button?

Ah ok, well reset it up and specified that did make everything during the day settings work again. But nighttime still will turn any LEDs for the Off behavior off, and leave the on ones on. But once you press the buttons in controls the devices and the led changes to the on colour and stays as that.

Pm your YAML so i can try to replicate.

Sent, sorry forgot to say it here.

Update works solid for me. Thank you Roy!

Edit: ignore previous question.

This is fantastic! Thank you Roy.

Found another corner case error that I think was breaking CamCorp, maybe others. Latest 2024.7.2 fixes it.

First of all, thank you, thank you to Roy Walker and all of the contributors and testers for the ZEN32 Blueprint. Kudos!
Secondly, relatively new to HA but not to home automation. I migrated over from HomeSeer using Leviton Vizia RF+ devices and we have about ~80 Z-wave devices installed with all of Vizia RF+ devices replaced with Zooz ZENxx devices. But I still think in HomeSeer terms when looking for solutions. I want to be able to set the state of the individual LED lights like when a new ‘scene’ is active. In HomeSeer world, I would create a ‘virtual device’ and set it to the desired state in a script. Then the state of the virtual device would control the LED on or off.
So, now in HA terms, what the best way to set a particular LED on or off in a script. Is this a service or ‘helper’? Not sure which route to take.

It depends on what is in your “scene”. If you wanted to turn on/off a group of lights, you could create a group with those lights and then have the group be the entity to track. You could make the scene be whatever you want, and only track the group. If you can provide exactly what you want to happen when you press a button and what you want the LED to do. I can provide you the steps.

Please and thank you! Here’s my use case: Press Button 3 for Dining Scene (Dining Table Lt On, Kitchen Pendants On, Kitchen Cans Off) and then set Button 3 LED to Green. So, it sounds like I create Group and then track the Group entity. Can a light (or any device) be part of more than one Group?

You can have 1 device in multiple groups, but what you want is just a scene. Here is a nice video on how to setup scenes. Then set the track entity to be the scene https://www.youtube.com/watch?v=t-k0sGchouU.

If you want wanted all lights to be the same, then a group would be easier option.

Thank you for the tip. Great video. Looks like the way I want to go. I appreciate the hand!

By the way – brilliant blueprint. Saved me hours!
In some version as bonus features, ability to set light led color/brightness based on state.
i.e. Lights are dim, brightness is low etc…
Probably way too complex for the benefit it will bring…

I thought about led tracking the light color/brightness, it would be very difficult. So not something i am going to do…

no worries. Make sense.
Couple of things I am struggling with:

  1. Big Button
    am struggling with how to get it to act exactly like the other buttons. With an Off LED Color and an On LED Color. have fiddled around, Local Relay Disabled, Scenes enabled… But a bit stuck.

  2. Maybe a bug?
    For testing, I created an input_boolean.toggle and attached it to the action (see below). But I get weird behaviour. It seems to run the toggle twice when I hit the physical button (and therefore do nothing) – at least that’s what I think is happening.
    If I change the action to light.toggle, it works as expected. Any ideas?

  - conditions: '{{ property_key_name == ''005'' and value == ''KeyPressed'' }}'
    sequence:
      - action: input_boolean.toggle
        target:
          entity_id: input_boolean.scenetogglehelper
        data: {}