For those having issues geeting the device to send any events at all, I had to enable hardware flow control on my SONOFF 3.0 dongle. I still haven’t gotten dimming to work (left or right dims down) but thats probably something minor.
This is working perfectly for me, except the dimming is very stuttery, like it’s jumping between brightnesses rather than smoothly transitioning. Is there a way to improve that?
If I bind the dimmer directly to a light, the dimming is nice and smooth. However, the dimmer only supports binding to a single bulb, whereas I want to control a group of lights with it, so I’m trying this blueprint. I created the group in Zigbee2mqtt then selected it in the blueprint config.
Is it possible to add a double tap or long press action to this?
It might be possible… A small “wait for trigger” after a press might do it. I’ll consider looking into it.
I’m having difficulty getting this to work. I’ve linked my action sensor as well as the brightness and neither passes the template condition of the automation. I have my Aurora with legacy disabled and here’s an example of what the MQTT message looks like for mine. Any ideas?
MQTT publish: topic ‘zigbee2mqtt/Bedroom Dimmer Switch’, payload ‘{“action”:“brightness_move_to_level”,“action_group”:57521,“action_level”:0,“action_transition_time”:0.07,“brightness”:255,“linkquality”:112,“update”:{“state”:“idle”},“update_available”:null}’
This where I am with the Lutron Aurora today and the steps I took to get there, this with in in my 1.23.0 zigbee2mqtt . I have no idea why your group number is different, but you may have to adapt it to what I did:
Yeah, I’m not sure why some of these knobs seem to have different values for action_group
, but you should be able to figure the value for various actions, and tweak this blueprint if you’d like.
I made a couple modifications to the blueprint, in order to hopefully handle some of the inconsistencies we’ve seen between individual Auroras. I removed the action_group
piece altogether, since action_level
seems to give a relevant value whether it is a twist or a tap, and accounted for differing action
values by simply checking if the word “brightness” is in there at all (like in “brightness” or “brightness_move_to_level”).
Hopefully this helps some of you!
Thanks for your work on this blueprint! Unfortunately I can’t seem to get it to work. I’ve read through this thread a number of times and have made sure that legacy mode is set to false, other than than I’m not really sure where to start with troubleshooting. When I set up the blueprint, select the dimmer and the lights I want to control, and save it. But I get no response from the lights.
I was able to fix the stuttering dimming by modifying the transition time in @drinfernoo’s super helpful blueprint (Thanks!). The key is to multiply the transition time by 10. Maybe this really should be fixed in the converter at zigbee-herdsman-converters/lutron.js at f14c9065d4f517549f5e213e3ee7cc3787ce0c57 · Koenkk/zigbee-herdsman-converters · GitHub, but you can fix it locally by updating the blueprint transition time like this:
transition_time: '{{ attrs["action_transition_time"] * 10 }}'
With the change, I’m getting dimming as smooth as when the dimmer was paired with my Hue hub. The smoothness is working for Hue bulbs, but not for my Lutron Caseta dimmers.
Update: I can smooth out the Caseta dimmers by going to a factor of 50, but not surprisingly that introduces significant lag.
@drinfernoo This blueprint looks awesome, but I’m having some issues with it and was hoping you could guide me towards finding the relevant solution.
I have the aurora lutron connected to HA with zigbee2mqtt, but I don’t have any hue lights or hub, i want to use it to control my shelly dimmable lights. (this worked with deconz but I’m now switching to z2m).
So using the blueprint as it is, it always fails on the condition being false, even though I see that the triggered action is ‘brightness_move_to_level’.
So just for testing, I removed the condition, but then the automation fails because it expects the ‘transition’ to be a float and it receives a string (I think).
It also expects action level to be an integer.
Any thoughts?
I am in this same place and I am using all Hue lights. So, this is not an issue with your lights. I have also done quite a bit of debugging with the add-on, ultimately getting stuck where you did. I found that the brightness level was not even a number (it is literally a string), so I think it is an issue with the way that the “brightness” dictionary is being unpacked.
What gets me is that I cannot figure out why you (and I) are the first to have this issue. Out of curiosity, where are you running HA?
I got it to work, I found that my MQTT payload was VERY different than everyone’ else.
I just moved over to Z2M last week and set up a few automations with this blueprint and with a few Luron Auroras. The last 2 nights two of them have been triggered around 3 AM without me touching the device but when i Look in my log it shows the automation being triggered. I haven’t touched either dimmer in over 48 hours. Anyone run into this? I’ve disabled the automatons as it turned my bedroom lights to 100% at 3 AM and woke me up 2 nights in a row smh.
I had to set the devices to legacy inside Z2M settings
The bluepriint installed just fine but thus far I have not been able to get it to work. I have deleted and re-added the auroras a couple of times to Z2M but no go. I have turned the legacy setting on/off to see if that is the issue but it has not helped. I see the most recent post was last Novemeber so perhaps something has changed in HA (would love to hear from someone who currently has this running). Not a big deal for me, but my wife, who will likely never go anywhere near HA, asked how she can turn the bedroom lights on 100% when she needs light to do something. So, to keep her happy trying to get this to work. Any help would be appreciated.
I was able to set this up and it was running fine but then my system had to reboot and since that reboot the blueprint won’t work, is there any way to fix this?
I seemed to need to reboot my Zigbee2Mqtt instance after adding the legacy: false
setting.
It wasn’t entirely clear above how to add it. There doesn’t seem to be a UI for it. Wherever you have Zigbee2Mqtt installed, you should have a configuration.yaml
file. Edit that and under each dimmer instance, add legacy: false
. Then restart the Docker container.
nano ~/data/zigbee2mqtt/configuration.yaml
devices:
'0xffff000fe7fc88b5':
friendly_name: Main-Bedroom/Aurora-Dimmer
legacy: false
docker container restart $(docker container ls | grep koenkk/zigbee2mqtt | awk '{print $1}')
Then the blueprint worked for me. Thank you very much.
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.
First, thank you for sharing this. I was just beating my head against the wall trying to get off of using only binding (I know the value for redundancy but for a variety of reasons I prefer to use HA)
Second, just for anyone else who can be an idiot like me, when it comes to adding the sensor it goes under “mqtt:” not under template or sensors or whatever else. I don’t have any other custom MQTT devices so it threw me off for a bit trying to find where it went. Also from what I know, unique_id can be whatever as long as it’s unique.
Here’s an example of a complete setup in your HA config file:
mqtt:
- sensor:
- name: "Dining Room Switch K MQTT"
unique_id: "1958669490006"
state_topic: "zigbee2mqtt/Dining Room Switch K"
value_template: "{{ value_json.action }}"
json_attributes_topic: "zigbee2mqtt/Dining Room Switch K"
json_attributes_template: "{{ value_json | tojson }}"
Hi,
I’m a bit of a newb to this, but I’m getting the following error in relation to this automation:
Logger: homeassistant.components.automation.zigbee2mqtt_lutron_aurora_dimmer_control
Source: components/automation/__init__.py:669
integration: Automation (documentation, issues)
First occurred: 3:43:07 AM (1 occurrences)
Last logged: 3:43:07 AM
Error rendering variables: UndefinedError: 'dict object' has no attribute 'to_state'
And the following warning as well:
Logger: homeassistant.helpers.template
Source: helpers/template.py:2613
First occurred: 3:42:50 AM (37 occurrences)
Last logged: 3:45:48 AM
Template variable warning: 'homeassistant.helpers.template.Wrapper object' has no attribute 'action' when rendering '{{ attrs["action"] }}'
Template variable warning: 'homeassistant.helpers.template.Wrapper object' has no attribute 'action_level' when rendering '{{ attrs["action_level"] }}'
Template variable warning: 'homeassistant.helpers.template.Wrapper object' has no attribute 'action_transition_time' when rendering '{{ attrs["action_transition_time"] }}'
Template variable error: 'dict object' has no attribute 'to_state' when rendering '{{ trigger.to_state.attributes }}'
Any idea how to fix? I added the entry to my config similar as to how Robert did it in the message above mine.