Group scenes for Blue switch LED effects?

There are some notifications that I’d like to display on the LEDs of multiple Blue switches in different parts of the house. I’m hoping that there’s some way to do this with group scenes, but when I look at this in Z2M’s Groups page, it looks like if I was to create a scene there, it would also include the on/off state and brightness of each switch’s load, and not just the LED effect.

So is there some way to create a scene that only affects specific values and doesn’t touch others?

I don’t believe Z2M supports any of the led effects in scenes:

I’d be extremely interested to learn that I’m wrong, though! Unsure is this is a Z2M thing vs ZigBee spec.

You CAN create scenes that only update certain [supported] attributes of a device, though (documented in that link) e.g. I “pre-stage” my hue bulbs by setting a network-wide group scene that only tells them to change their color temp, but not to turn on or off. This way, bulbs that are currently on stay on and those that are off stay off (but will immediately be the correct color temp when they are turned on via a bound switch).

So if that’s the case, is it at least possible to somehow send the same LED effect commands to a group, thereby making automations slightly less of a nightmare?

And just saw your edit… I’ll try to decipher the info at that link. Thanks. I was hoping for a GUI method of doing this.

I haven’t tried it, but I see no reason it wouldn’t work: Z2M supports updating groups with anything you could update a single device with. I’m hitting the limits of my knowledge here quickly, though so don’t want to steer you in the wrong direction.

Yeah, I’m trying to figure out how to actually do it from an automation. Might require a service call?

Yes, looks like you can call the mqtt.publish service to send messages. I use NodeRed for all of my automations so I’m not too familiar with HA’s capabilities there.

1 Like

@euggersh were you able to figure out a solution? I have single switches set up to display effects while certain automations are running, but it’d be awesome if I could easily apply the effect to a group instead.

I use zha instead of z2m so I don’t know how much of this will work for you but this is my approach for sending notifications to all of my switches. I have two different scripts to make this work:

alias: Send Inovelli Notification
sequence:
  - service: zha.issue_zigbee_cluster_command
    data_template:
      cluster_type: in
      ieee: "{{ieee_id}}"
      endpoint_id: 1
      cluster_id: 64561
      command: 1
      command_type: server
      params: "{{command_args}}"
mode: parallel
icon: mdi:bell
max: 100

This script takes the ieee_id of the switch and the args for the event. Those are supplied by the script below.

alias: Trigger Switch Notification
sequence:
  - alias: Iterate through switch notifications
    repeat:
      count: "{{ ieee_ids | count }}"
      sequence:
        - variables:
            ieee_id: "{{ ieee_ids[repeat.index - 1] }}"
        - service: script.turn_on
          data_template:
            variables:
              command_args: 
                led_effect: 1
                led_color: 1
                led_level: 99
                led_duration: 255 
              ieee_id: "{{ieee_id}}"
          target:
            entity_id: script.send_inovelli_notification
variables:
  ieee_ids: |-
    {% set result = namespace(ids=[]) %}
    {% for state in states.light %}
      {% if device_attr(state.entity_id, 'model') == 'VZM31-SN' %}
        {% set result.ids = result.ids + [(device_attr(state.entity_id, 'identifiers')|list).0.1] %}
      {% endif %}
    {% endfor %}{{ result.ids }}
mode: single
icon: mdi:bell

The script works by finding the ieee_ids of all lights that match the blues model number. It then iterates through all of the ieee_ids and sends cluster commands to each individual switch.

You can calculate the values for command args as follows:

You can also technically combine this into one script, but zha sometime fails to send a command to a single switch. If it’s one script that causes the whole thing to fail. By breaking it out into another script only that single switch notification fails instead.

1 Like

I haven’t managed to do this yet. I was hoping for a simple UI solution but this appears to be more hacky than I have time to figure out.

I wrote a Home Assistant Blueprint that will call multiple lights at a time in a loop.
[Z2M] Inovelli VZM31-SN Blue Series 2-1 Switch LED Notification Script - Blueprints Exchange - Home Assistant Community (home-assistant.io)

I haven’t had time to group switches together in Z2M so I haven’t tested this on Z2M groups. But it works great when calling single or multiple switches at a time.

1 Like