Keep states in sync between scene controller and Z-Wave switched outlet

I’m sure I’m overthinking this, but I just can’t wrap my brain around how to do what I’m trying to do.

I’ve got a ZEN32 scene controller and use an automation built using the ZEN32 (Z-Wave JS) Blueprint to control a switched outlet in the garage connected to some additional lights (call service → switch.toggle) via the scene1 button (the first small button). Each button on the ZEN32 has a small indicator LED, and that helps me know if the garage lights are on. I’m using it in it’s default state, so LED off == switched outlet is on.

As long as I only interact using the scene 1 button on the ZEN32, everything works great. If I do anything else, the two get out of sync. For example, I’ve got a picture-elements card of my house with elements for all of the controllable things. Since I can’t select the ZEN32 scene buttons as entities, I have one for the switched outlet in the garage. As soon as I turn the garage lights on/off using that, the indicator light on the ZEN32 is no longer in sync.

Is this an Automation thing? A Scene thing? A Script thing? An only-in-Node-Red thing? Something else? In an ideal world (at least to me), each scene button would show up as a switch I could target. There must be some reason it doesn’t, and it can’t be because “software is hard”. I’d appreciate any help/guidance people have.

Thanks in advance!
Rich

Is it possible to switch the led on and off?

Yes, it does appear possible to control the light (state and color). Doing that as part of this is part of the mystery I’m trying to solve.

I think you’ll need to make an automation to turn the led on/off when the garage light state changes.

Did you ever end up figuring this out? I’m now struggling with the same exact thing.

The solution is stated.

I created 2 automation rules to solve this, one for on and one for off. I’m sure there’s a more efficient way but this works for now. I used zwave_js.set_config_parameter for the action.

Rich

One option that I use is a single automation, where the trigger is any change of state. Then in the actions I put a condition, which checks the status of the state and sends the right action. Brings it down to one automation instead of two.

In this case I have two switches that I want to synchronize. I probably should use a little more logic and only set the color if it needs to be set, but I haven’t gotten around to it.

alias: 'Patio-DR/LR: Sync Scene Switch Lights: Fan'
description: ''
trigger:
  - platform: state
    entity_id: fan.patio_ceiling_fan
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: fan.patio_ceiling_fan
            state: 'off'
        sequence:
          - service: mqtt.publish
            data:
              topic: ZwaveJs700/Dining_Room/DR_Patio_Scene_Switch/112/0/5/set
              payload: '2'
          - service: mqtt.publish
            data:
              topic: ZwaveJs700/Living_Room/LR_Patio_Scene_Switch/112/0/5/set
              payload: '2'
    default:
      - service: mqtt.publish
        data:
          topic: ZwaveJs700/Dining_Room/DR_Patio_Scene_Switch/112/0/10/set
          payload: '2'
      - service: mqtt.publish
        data:
          topic: ZwaveJs700/Living_Room/LR_Patio_Scene_Switch/112/0/10/set
          payload: '2'
      - service: mqtt.publish
        data:
          topic: ZwaveJs700/Dining_Room/DR_Patio_Scene_Switch/112/0/5/set
          payload: '3'
      - service: mqtt.publish
        data:
          topic: ZwaveJs700/Living_Room/LR_Patio_Scene_Switch/112/0/5/set
          payload: '3'
mode: single

1 Like