[Z2M] Inovelli Blue Series Switch LED Notification Script (VZM31-SN, VZM35-SN)

Are there any errors in the Home Assistant log?

If not, you can check one other possibility.
Does the name of the switch in Home Assistant match the name in Z2M?
If not, you will need to override the command path when calling the script.

  • Find the command path
    • Settings > Devices > MQTT (click on “## Devices”) > DEVICE NAME
    • Click on “More Info” and expand “Payload”
    • Find command_topic and copy the value
  • Enter the entity_id of the light entity and the command_topic copied from the device and paste it into the “Command Path Map” field
    Example:
light.west_light: "zigbee2mqtt/living_room/lights/west_light/set"
light.east_light: "zigbee2mqtt/living_room/lights/east_light/set"

No errors in the log (matching the device or script). I found some other things to look at but that’ll be for another time.

Getting the command_topic was exactly what I needed!
I bet that is because I changed the device type to be a fan instead of it being a light or a switch.

Thanks a ton!

1 Like

Nice, glad it’s working!

This is FANTASTIC! Thank you all for the hard work. For some reason, the blueprint/script did not work right away for me. Double checked the requirements, etc. All options were selected, but when I changed the Effect from blink to solid a few times, the script started working.

I have been looking for something like this. Thanks much!

1 Like

@zanixmechanix Just wanted to give you a heads up that this blueprint is broken after updating to Zigbee2MQTT version 1.36. This appears to be due to a change in the Inovelli device model name.

Previous model name:
Inovelli 2-in-1 switch + dimmer (VZM31-SN)

New model name:
2-in-1 switch + dimmer (VZM31-SN)

1 Like

I just checked and it works. I am on Z2M 1.36.0 and Home Assistant 2024.2.5
The last updates to the blueprint were fixes for the model IDs that just use the model number.

2023.10.2

Update model filter to only model numbers

  • This fixes the fan switch not working with the latest Zigbee herdsman converters

2023.10.3

Model ID fix

  • Fix changing the model IDs in the last update that broke the script

You might have an older version, have you tried re-importing the blueprint?

1 Like

good moring.
i seem to have an issue where only Aurora effect works. no other effect works the bar is just off. i have tried different colors.
also if i want to reset the ‘on’ bright blue ‘off’ dim blue do i just set that in another script with the 'LED Color When On (non-effect)" ‘LED Color When Off (non-effect)’?

I just checked all of the effects against my office switch and they are working.
What fields are you setting in the script?

As for LED Color When Off/On, this script does not control those parameters.

i am setting
Device.
Duration of effect.
Effect.
Effect Brightness.
Effect Color.

i do have on/off set in the config of the switch it just doesn’t revert after the script runs. it just turns the led bar off.

Can you turn the debug option on and copy what is output in the notifications?

Just wanted to say thank you for continuing to support this blueprint and making this change. Reimporting the blueprint, which I hadn’t done to date, corrected my issues without needing to do anything else.

1 Like

sorry for the late response. how do i go about doing that? is that something in traces?

We should back up a bit and check if the LED effect works in Z2M.

If the effects work in Z2M, then we can check the script.

First, check the MQTT command path.

  • Settings > Devices > MQTT (click on “## Devices”) > DEVICE
  • Click on “MQTT Info” and expand “Payload”
  • Find the Light device in the list (mine shows as “Family Room Light (light.family_room )”)
  • Copy and paste the contents of “Payload” here

This is what mine looks like

availability:
  - topic: zigbee2mqtt/bridge/state
    value_template: '{{ value_json.state }}'
  - topic: zigbee2mqtt/Family Room Light/availability
    value_template: '{{ value_json.state }}'
availability_mode: all
brightness: true
brightness_scale: 254
command_topic: zigbee2mqtt/Family Room Light/set
device:
  identifiers:
    - zigbee2mqtt_0x385000000000002d
  manufacturer: Inovelli
  model: 2-in-1 switch + dimmer (VZM31-SN)
  name: Family Room Light
  sw_version: '2.15'
  via_device: zigbee2mqtt_bridge_0x385000000000002d
...

Make sure the name in command_topic matches the friendly name of the device.
If not, then you will need to edit the Comand Path Map option.

Next, you can find the debug option when calling the script.
image

Once the script is run, it will create a notification. This will display what values are sent to the switch.

2024.4.0

Floor and Label Support

  • Add support for Floors and Labels
  • Use device identifier instead of device name for Z2M
    • This should fix needing to use command path map for oddly named devices
    • Command path map is still available if needed
  • Add Command base path
    • This is used when the base MQTT path for Z2M has been changed
  • Command base path and command path map are available as blueprint inputs
    • This allows setting a “default” value for these settings

Follow Re-importing a blueprint to update

2 Likes

Getting this warning with 2024.8.0:

Deprecated payload_template option used in MQTT publish action call to topic zigbee2mqtt/Lights/set from payload template {"led_effect": {"color": 170, "duration": 60, "effect": "pulse", "level": 100}} . Use the payload option instead. In automations templates are supported natively. Update the automation or script to use the payload option instead and restart Home Assistant to fix this issue.

I believe this line just needs to be changed from
payload_template: '{{ payload }}'
to
payload: '{{ payload }}'

That looks right. I haven’t updated to 2024.8.0 yet but once I do I will confirm this works and update the blueprint.

2024.8.0

Payload Template Deprecation

  • Change payload_template to payload in mqtt.publish call

Thanks to @nmbgeek for the pull request

1 Like

Thanks for creating this blueprint! I just started using it today and it works great… as long as I’m controlling a single switch. When I try to use a label, nothing happens on any of the switches with that label. Any thoughts on how I can troubleshoot this?

Are the labels on the device or the light entity?

They’re on the switch devices. Do I need to have them on the entities instead? (When I successfully use this for individual switches, that’s also on devices)