Controlling VZM31-SN (blue series 2-1) LEDs in ZHA

I have a bunch of blue series 2-1 switches as well as a couple of blue series fan switches and I noticed that I can control the fan switches’ LED intensity and color in ZHA but the 2-1 switches don’t have those controls.

I found a blueprint for a script that claims it will let me control that but it keeps failing with “unknown error” which kind of puts a damper on my debugging.

My firmware version for the 2-1s is 0x01020212 and I have automatic updates turned on with:

zha:
  zigpy_config:
    ota:
      z2m_remote_index: https://inov.li/omega/firmware-zha.json

Is there a version of the VZM31-SN firmware which will give me control over the switch plate LEDs in the configuration section of the UI? If so, when will it be generally available or how can I get access to it early? Will that version also allow me to use the config button as a trigger for automations like I can with my fan switches?

Do you want to control all the LEDs together or the individual LEDs? The all option should be in the configuration section of the UI for you, the individual never has been (there are already a ton of parameters, and given the limited text description available it would make it a lot harder to differentiate), but is available by going to the device page > 3 vertical dots to Manage Zigbee device > Cluster to InovelliVZM31SNCluster Endpoint 1 in > attribute dropdown to the default led# options you want.

Or if you meant controlling the LEDs as part of a notification rather than the default color, you can also just use the device action “Issue effect for individual LED” in Home Assistant.

I want the same LED controls I have on the VZM35-SN fan switch, I want to change the color and brightness because they’ve been unpleasant at night. Based on your comment, that should be available in the latest firmware but for some reason my home assistant is not picking up the new versions.

I’ll try swapping to a different z2m_remote_index and maybe switching to inovelli_provider: true to see if either of those gives me a firmware update.

Nevermind it looks like I am on the 2.18 firmware version. Are there any plans to add the same level of LED control to the VZM31-SN as there is on the VZM35-SN?

For reference, VZM35-SN page:

VZM31-SN:

That looks like just the default config clusters that show up when you add a device. Have you restarted HA since you added the VZM31-SN? If not, I’d try that to see if something was stuck and if that’s unsuccessful maybe remove/re-add the switch and give it a little bit? I know I’ve had a couple times where a newly added device won’t have everything show up right away, but if I come back to it later it’s there.

You should definitely have a lot more on there similar to the Fan switch (partial snippet as an example) -
image

That is weird. I’m running the official docker image of home assistant and since first noticing this issue have updated it and restarted it and also deleted and re-paired one of my switches.

I’m glad to see that the features I want are actually supposed to be there but that does make me wonder what else I can do to make it show them to me.

I installed one fan switch a few weeks ago and the rest of them (11 VZM31-SNs, 1 VZM35-SN and an aux switch but that one doesn’t matter) this last weekend. I guess I’ll give it another update and restart and maybe factory reset and re-pair a switch again to see if either of those gets it working right.

None of the 11 VZM31-SN’s have those showing up? What version of HA are you currently on?

I’m also running via docker, if we can’t figure it out before the weekend I’ll set up a new switch to test with and see if I can replicate and get a fix for it assuming you’re on the latest, etc.

Home assistant version:

Core          2024.4.1
Frontend    20240404.1

Here is my compose.yml file for the docker container if that helps:

version: '3'
services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /home/docker/homeassistant/config:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    devices:
      - '/dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0_d48d1c46d29ced118fed7bfaa7669f5d-if00-port0:/dev/ttyUSB0'
    restart: unless-stopped
    privileged: true
    network_mode: host

And here is the zha section of my configuration.yaml (there is nothing in the /config/zigpy_ota directory right now):

zha:
  zigpy_config:
    ota:
      ikea_provider: true
      inovelli_provider: true
      sonoff_provider: true
      otau_directory: /config/zigpy_ota
      z2m_remote_index: https://inov.li/omega/firmware-zha.json

None of the 11 VZM31-SNs show those options. Where does HomeAssistant get those options from? Is it the quirk from the ZHA device handler?

That’d be why then :slight_smile: The support for the most recent firmware wasn’t in HA until at least 2024.4.3 with some changes for 2.17 where the device’s signature changed. You should see this work after upgrading HA.


The quirk options are seen when you do the manage zigbee device option, the frontend “Configuration” UI piece in HA is actually within HA’s code.

I clearly needed to learn more about docker. The issue is that every time I updated I ran:

$ docker compose pull
$ docker compose restart

but it look like restart just starts the container as is and I needed to do docker compose up -d to actually apply the pulled changes.

I have so many containers I need to re-up correctly now

Now that I updated it, the switch I removed and re-added shows all of the new settings, I’ll wait a day or so and then remove and re-add the rest of them if they don’t update by themselves.

1 Like