I wanted to share my experience…I’m running HA 2023.12 and Zigbee2MQTT AddOn 1.34 with legacy set to false for this dimmer).
After some work, I got the Blueprint to work as is without any changes. But what I found was that the HA dimmer sensors provided by z2m via mqtt discovery did not work with this Blueprint. I had to create a new MQTT sensor to get this Blueprint to work.
-----Some Details ------
For the “action” sensor created by z2m, when pushing the button on the Aurora device (named “Fireplace Dimmer”), the event on the event does not have attributes “action_level”, nor “action_transition_time” that are needed for the Blueprint:
event_type: state_changed
data:
entity_id: sensor.fireplace_dimmer_action
old_state:
entity_id: sensor.fireplace_dimmer_action
state: ""
attributes:
icon: mdi:gesture-double-tap
friendly_name: Fireplace Dimmer Action
last_changed: "2023-12-16T23:14:17.278622+00:00"
last_updated: "2023-12-16T23:14:17.278622+00:00"
context:
id: 01HHTEHDHY868MNY8CQ9RWJQZ7
parent_id: null
user_id: null
new_state:
entity_id: sensor.fireplace_dimmer_action
state: brightness_move_to_level
attributes:
icon: mdi:gesture-double-tap
friendly_name: Fireplace Dimmer Action
last_changed: "2023-12-16T23:15:09.993142+00:00"
last_updated: "2023-12-16T23:15:09.993142+00:00"```
Looking at the z2m MQTT discovery that creates the “action” sensor the config only specifies “state” but there are no “attributes” such as “action”, “action_level”, nor “action_transition_time” that are defined:
availability:
- topic: zigbee2mqtt/bridge/state
value_template: '{{ value_json.state }}'
device:
identifiers:
- zigbee2mqtt_0xffff000fe7fee53b
manufacturer: Lutron
model: Aurora smart bulb dimmer (Z3-1BRL)
name: Fireplace Dimmer
sw_version: '3.8'
enabled_by_default: true
icon: mdi:gesture-double-tap
name: Action
object_id: fireplace_dimmer_action
origin:
name: Zigbee2MQTT
sw_version: 1.34.0
support_url: https://www.zigbee2mqtt.io
state_topic: zigbee2mqtt/Fireplace Dimmer
unique_id: 0xffff000fe7fee53b_action_zigbee2mqtt
value_template: '{{ value_json.action }}'
platform: mqtt
which explains why the necessary attributes on the event bus are missing.
The way I was able to get this to work was to create a new MQTT sensor that makes use of the topic and its payload that z2m sends out. Here is an example of the topic and payload that z2m sends out:
zigbee2mqtt/Fireplace Dimmer {"action":"brightness_move_to_level","action_group":64821,"action_level":0,"action_transition_time":0.07,"brightness":null,"linkquality":116,"update":{"installed_version":3080,"latest_version":3080,"state":"idle"},"update_available":null}
Here is the config for the mqtt sensor I created:
sensor:
- name: "Fireplace Dimmer"
unique_id: "195866949"
state_topic: "zigbee2mqtt/Fireplace Dimmer"
value_template: "{{ value_json.action }}"
json_attributes_topic: "zigbee2mqtt/Fireplace Dimmer"
json_attributes_template: "{{ value_json | tojson }}"
The attributes created by {{ value_json | tojson }}
are dynamic and come and go or change on each receipt of the z2m mqtt payload but allows “action_level” and “transition"time” to show up.
With this new sensor, the event bus now has the necessary attributes that work with the Blueprint:
event_type: state_changed
data:
entity_id: sensor.fireplace_dimmer
old_state:
entity_id: sensor.fireplace_dimmer
state: ""
attributes:
action: ""
brightness: null
linkquality: 47
update:
installed_version: 3080
latest_version: 3080
state: idle
update_available: null
friendly_name: Fireplace Dimmer
last_changed: "2023-12-16T23:14:17.278535+00:00"
last_updated: "2023-12-16T23:14:17.278535+00:00"
context:
id: 01HHTEHDHY6JE2JFSF0VN87PQV
parent_id: null
user_id: null
new_state:
entity_id: sensor.fireplace_dimmer
state: brightness_move_to_level
attributes:
action: brightness_move_to_level
action_group: 64821
action_level: 255
action_transition_time: 0.07
brightness: null
linkquality: 40
update:
installed_version: 3080
latest_version: 3080
state: idle
update_available: null
friendly_name: Fireplace Dimmer
last_changed: "2023-12-16T23:15:09.992502+00:00"
last_updated: "2023-12-16T23:15:09.992502+00:00"
Anyway, I don’t know if this is a problem for others, but that was what happened in my case.