Inovelli, Home Assistant & Z-WaveJS Mega tutorial

In this post, I want to cover how to use the Inovelli Red Dimmer (LZW31-SN) with Home Assistant. This will cover how to integrate the dimmer and then how to use it in real-world scenarios

Setup

In my setup I’m using Home Assistant OS on a Raspberry Pi with an Aeotech Gen 5 ZWave stick (ZW090) with the Inovelli Red Dimmer (LZW31-SN). I have installed the ZWave-JS add-on. I am going to also to use S2 security with the dimmer. Once you have your dimmer paired to your Zwave network, we can start configuring automations. Note: These automations will ONLY work with the setup I have described.

Before we begin, the LZW31-SN dimmer has three buttons:

1. The Down Button (001)
2. The Up Button (002)
3. The Config Button (003)

We will use these button ID’s when listening for events.

Turning on the light and dimming it

Turning the light(s) connected to the dimmer are no different to any other light in Home Assistant.

- alias: '[Inovelli] Turn on light to 24% brightness'
id: 'inovelli_turn_on_light_to_24_brightness'
trigger:
- platform: state
entity_id: binary_sensor.inovelli_example
from: 'off'
to: 'on'
action:
- service: light.turn_on
data:
entity_id: light.sfo_inovelli_closet_dimmer
brightness: 24


The brightness parameter is optional, but gives you extra control to set a brightness the bulb.

Turn on LED strip effect

In this example, we are going to turn on the LED effect strip of the dimmer. Firstly, we need to determine how to configure the parameter. Nathan Fiscus’s Inovelli Notification calculator makes this easy. On the Notifications tab, you pick a color, brightness level, duration and effect and the utility will provide you a parameter value. In my example, I have picked the following parameters:

• Color: 168 (Dark Blue)
• Brightness: 10
• Duration: Infinity

The utility gives me a value of 83823268 which I then set by using the zwave_js.bulk_set_partial_config_parameters service as per the below example:

- alias: "[Inovelli] LED effect example"
id: 'inovelli_led_effect_example'
trigger:
- platform: state
entity_id: binary_sensor.inovelli_example
from: "off"
to: "on"
action:
- service: zwave_js.bulk_set_partial_config_parameters
data:
parameter: '16'
value: 83823268
target:


To turn off the effect, I am going to press the config button (003) on the switch to trigger the cancellation of the effect. To disable the effect, I am going to set the following:

• Color: 168 (Dark Blue)
• Brightness: 10
• Duration: Infinity
• Effect: Off

The color/ brightness/ duration values could be set to anything, the only one that matters is effect. This gives a value of 16714408.

- alias: "[Inovelli] Turn off LED effect example"
id: 'inovelli_turn_off_led_effect_example'
trigger:
- platform: event
event_data:
property_key: "003"
value: "KeyPressed"
action:
- service: zwave_js.bulk_set_partial_config_parameters
data:
parameter: '16'
value: 16714408
target:


Triggering an automation using the switch

In this example, I am going to use the buttons on the dimmer to trigger an automation in Home Assistant. In this example when the Up button (003) is held down, it will trigger a notification to be posted to Slack.

- alias: "[Test] Scene Example"
id: 'scene_example'
trigger:
- platform: event
event_data:
property_key: "002"
value: "KeyHeldDown"
action:
- service: notify.slack
data:


Programming multiple dimmers

I own multiple dimmers, but I want to have identical button automations. So, I want to program all dimmers to respond in an identical manner. Fortunately, this is achievable in a simple manner. In this case, we create triggers that do not apply to a specific device_id, but the corresponding action will be applied to the dimmer in which the button was pressed. In this example, when the Down button (001) is pressed once, it will turn off the corresponding bulbs and reset the LED strip color to white.

- alias: "[Inovelli] 1x press down"
id: 'inovelli_1x_press_down'
trigger:
- platform: event
event_data:
property_key: "001"
value: "KeyPressed"
action:
- service: light.turn_off
data:
device_id: '{{ trigger.event.data.device_id }}'
- service: zwave_js.bulk_set_partial_config_parameters
data:
parameter: '13'
value: 255
target:
device_id: '{{ trigger.event.data.device_id }}'


Changing the brightness of an evening

One thing I noticed after installing multiple dimmers was that the brightness is too high on the strip of an evening. To correct that, I created an automation that lowers the brightness at 11pm and then sets it back to 100% just after sunrise.

- alias: "[Inovelli] Change LED brightness at sunrise"
id: 'inovelli_change_led_brightness_at_sunrise'
trigger:
platform: template
value_template: "{{ states.sun.sun.attributes.elevation > 5 }}"
action:
- service: zwave_js.bulk_set_partial_config_parameters
data:
parameter: '15'
value: 10
target:
entity_id:
- group.inovelli_lights

- alias: "[Inovelli] Change LED brightness at 11pm"
id: 'inovelli_change_led_brightness_at_11pm'
trigger:
- platform: time
at: '23:00:00'
action:
- service: zwave_js.bulk_set_partial_config_parameters
data:
# command_class: '112'
parameter: '15'
value: 1
target:
entity_id:
- group.inovelli_lights


Conclusion

I hope this guide was helpful to get started with Inovelli Dimmer’s. The flexability of the dimmer makes it a great companion for the smart home. The reasonable price of \$44/ dimmer also makes it a worthwhile investment.