An automation blueprint to display a temperature on the LED notification bar on the Inovelli VZM31-SN or VZM35-SN Blue Series 2-1 Switch via ZHA.
The Inovelli VZM31-SN or VZM35-SN Blue Series 2-1 Switch comes with seven (7) LED lights in a strip on the right side of the faceplate (below the small config button). If we imagine this strip as a classic mercury thermometer, we can display a representation of a temperature between a minimum and maximum value.
Features
- Display a temperature as a percentage between a minimum and maximum.
- Ex. If the minimum temperature is 0 and the maximum temperature is 100, and the current temperature is 50, the bottom three of the seven LEDs in the strip will illuminate.
- Customize color (default: red), intensity (default: 50%) and duration (default: always on) of the LED display.
Requirements
- ZHA
- An Inovelli VZM31-SN (light) or VZM35-SN (fan) Blue Series 2-1 Switch added to your ZigBee network in Home Assistant
- A temperature sensor in your Home Assistant to pull a temperature from
Blueprint
blueprint:
name: Inovelli LED Temperature Display
description: Display the temperature on the LED strip of an Inovelli VZM31-SN or VZM35-SN light switch
source_url: https://raw.githubusercontent.com/nwithan8/configs/main/home_assistant/blueprints/automations/inovelli_led_temperature.yaml
domain: automation
input:
temp_sensor:
name: Temperature Sensor
description: The temperature sensor to monitor
selector:
entity:
domain: sensor
device_class: temperature
min_temp:
name: Minimum Temperature
description: The minimum temperature. Anything below this will be displayed as the minimum temperature (no LEDs)
default: 0
selector:
number:
# You're literally dead at either of these temperatures
min: -200
max: 199
unit_of_measurement: degrees
mode: box
max_temp:
name: Maximum Temperature
description: The maximum temperature. Anything above this will be displayed as the maximum temperature (all LEDs)
default: 100
selector:
number:
min: -199
max: 200
unit_of_measurement: degrees
mode: box
switch:
name: Inovelli VZM31-SN
description: Which light switch to program
selector:
device:
integration: zha
manufacturer: Inovelli
duration:
name: Duration
description: How long the effect should last, in seconds (1-254, 255 for indefinite)
selector:
number:
min: 1
max: 255
default: 255
level:
name: Intensity
description: How intense the light should be, percentage (0-100)
selector:
number:
min: 0
max: 100
default: 50
color:
name: Color
description: The color the light should be, (0-254, 255 for white)
selector:
number:
min: 0
max: 255
mode: box
default: 0
mode: single
max_exceeded: silent
variables:
temp_sensor: !input temp_sensor
temperature: "{{ states(temp_sensor) | float(0) | round(1) }}"
solid_led_effect_code: 1
off_led_effect_code: 0
led_command: 3 # Set individual LED
max_temp: !input max_temp
min_temp: !input min_temp
level: !input level
duration: !input duration
switch: !input switch
color: !input color
off_color: 255 # White
temperature_range: "{{ max_temp - min_temp }}"
led_range: 7
leds_to_turn_on: "{{ (temperature - min_temp) / temperature_range * led_range | round(0) | int }}"
trigger:
platform: state
entity_id: !input temp_sensor
action:
- repeat:
count: "{{ led_range }}"
sequence:
- service: zha.issue_zigbee_cluster_command
data:
ieee: >
{{ (device_attr(switch, "identifiers")|list).0.1 }}
endpoint_id: 1
cluster_id: 64561
cluster_type: in
command: "{{ led_command }}"
command_type: server
# Index starts at 1 like an idiot
params:
"led_number": "{{ repeat.index - 1 }}"
"led_effect": >
{%- if repeat.index - 1 <= leds_to_turn_on -%}
{{ solid_led_effect_code }}
{%- else -%}
{{ off_led_effect_code }}
{%- endif -%}
"led_color": >
{%- if repeat.index - 1 <= leds_to_turn_on -%}
{{ color }}
{%- else -%}
{{ off_color }}
{%- endif -%}
"led_level": "{{ level }}"
"led_duration": "{{ duration }}"
manufacturer: 4655
Install
- Click the “Import Blueprint” button above and follow the instructions to import the blueprint into your Home Assistant.
- Click “Create Automation” from the Blueprint.
- Select a
Temperature Sensor
to monitor. The temperature reported by this sensor will determine the display on your light switch.- This automation will run every time the temperature on this sensor is updated.
- Select a
Minimum Temperature
andMaximum Temperature
. These will determine how many LEDs are illuminated on your light switch.- These are in the same units as the temperature reported by your temperature sensor.
- A reported temperature below the minimum temperature will result in no LEDs illuminated.
- A reported temperature above the maximum temperature will result in all LEDs illuminated.
- It’s recommended to not make this range too large, otherwise changes in temperature will be less noticeable on the LEDs.
- For example, if the minimum and maximum are set to 30 and 100, respectively, the temperature would have to increase/decrease 10 degrees to change the number of LEDs illuminated on the LED strip.
- Select a target Inovelli light switch to change the LEDs of.
- (Optional) Change the duration, in seconds, of the LED illuminance.
- By default, the LEDs are always on (255)
- (Optional) Change the intensity of the LED illuminance.
- By default, the LEDs illuminate to 50% brightness
- (Optional) Change the color of the LEDs
- Use this calculator to determine color value.
- By default, the LEDs are solid red (0)
- Click “Save” to save your automation.
Usage
When the temperature reported by the selected temperature sensor changes, this automation will be triggered, illuminating some or all of the LEDs on the selected Inovelli light switch.
The LEDs illuminate in bottom-up order, replicating how mercury in a thermometer rises. The higher the temperature, the more LEDs illuminated, and vice versa.
Changelog
- August 16, 2023: Initial release
- October 31, 2023: Remove model lock, allowing use of VZM35-SN fan switches