Zigbee2MQTT Lutron Aurora Dimmer Control

This blueprint allows you to control any dimmable light using a Lutron Aurora dimmer knob, integrated via Zigbee2MQTT. My main reasoning behind creating this blueprint in the first place is because it appears that some bulbs (these Sengled ones, in my case) do not appear to update their state in Z2M when they are controlled directly via a bound remote, so while controlling them with the dimmer knob works, the state inside HA doesn’t always get updated, and causes a disparity between the physical state of the bulb and the reported state inside HA. If you have seen similar issues, this blueprint is for you! As an added bonus, this should be able to control any dimmable light entity (not just Zigbee ones), including light groups :grin:

Requirements:

  • At least one Lutron Aurora, integrated via Zigbee2MQTT
  • Any other (dimmable) light

What doesn’t work:

  • Lutron Aurora knobs integrated via Zigbee Home Automation

FAQ:

Which entity should I use?
This blueprint should work with any of the sensor entities created for the Aurora (‘action’, ‘brightness’, ‘linkquality’, or ‘update state’), but for clarity in your automations, I would recommend using either the ‘action’ or ‘brightness’ entities.

Should I bind the knob and bulb?
When the dimmer knob is bound to the bulb, this blueprint does not function correctly, so make sure to unbind the knob and bulb if you want to use this blueprint. Instructions for unbinding can be found here.

Blueprint

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

blueprint:
  name: Zigbee2MQTT Lutron Aurora Dimmer Control
  description: Control any light with the Lutron Aurora remote, integrated by Zigbee2MQTT.
  domain: automation
  input:
    aurora:
      name: Aurora
      description: The Lutron Aurora you wish to use to control this light. Use of the 'action' or 'brightness' entity is recommended.
      selector:
        entity:
          integration: mqtt
          domain: sensor
    light:
      name: Light
      description: The light you wish to be affected.
      selector:
        target:
          entity:
            domain: light

mode: queued
max_exceeded: silent

variables:
  attrs: "{{ trigger.to_state.attributes }}"
  action: '{{ attrs["action"] }}'
  action_group: '{{ attrs["action_group"] }}'
  action_level: '{{ attrs["action_level"] }}'
  transition_time: '{{ attrs["action_transition_time"] }}'

trigger:
  - platform: state
    entity_id: !input aurora
    to: "brightness_move_to_level"

condition:
  - condition: template
    value_template: "{{ action == 'brightness_move_to_level' }}"

action:
  - choose:
      - conditions:
          - condition: template
            value_template: >-
              {{ action_level in [0, 255] and action_group == 6874 }}
        sequence:
          - service: light.toggle
            data:
              transition: "{{ transition_time }}"
            target: !input light
    default:
      - service: light.turn_on
        target: !input light
        data:
          transition: "{{ transition_time }}"
          brightness: "{{ action_level }}"

I would like to find a way to narrow down the selector to only show the entities associated with the Aurora’s themselves, so if anyone can point me in the right direction, that would be appreciated, and I can update the blueprint :wink: It seems to me that the selector parameters won’t allow me to get quite that detailed at this time, but hopefully in the future (or possibly now :sweat_smile:) we’ll be able to.

1 Like

What a freakin’ LEGEND! :metal:

I was looking at a completely different tutorial for the past 3 days which explains how to use ZHA instead of Zigbee2MQTT but it used Node Red… So I thought, what the hell, can’t be THAT difficult to get it to work… Anyway, 3 days later says it all :smiley:

I imported your blue print and it just WORKED immediately!

Thank you SO much, was starting to lose hope! :sweat_smile:

1 Like

I’m glad it’s working for you! I’ve been using it since I posted this blueprint, and have been mostly satisfied. There are some “kinks”, like if the light gets turned on/off from HA, rather than the knob, it sometimes takes two knob presses to change it again… but that’s pretty minor.

I’d like this blueprint to work with ZHA as well, but seems it would be a bit trickier to set up… and I’ve also completely migrated to Z2M, so setting up ZHA again just to test would be a bit of a chore at this point :sweat_smile:

Oooh I didn’t even stop to realize that the blueprint is obviously using Z2M and NOT HA as it’s “controlling” mechanism… Lol, I am so new to this still I am just learning as I go and damn, there’s ALOT to learn.

But like you say, it’s a minor thing… I’d rather have 2 clicks occasionally than NOT have the integration working at all :smiley:

So you switched from ZHA to Z2M, was there any specific reason?

The blueprint uses HA to affect the lights, based on input from Z2M.

I switched from ZHA to Z2M for two reasons:

  1. I was getting sick of not really being able to diagnose what was happening in my Zigbee network, which I can do easily by listening to the MQTT data.
  2. I upgraded my Zigbee hub to one that supports Z2M, and figured “why not?” :sweat_smile:

To be fair, I did upgrade to a ZZH stick because I found out that it would support Z2M, and that would solve my first issue :grin:

1 Like

Ahhh what a coincidence, I ended up with the same stick :smiley:

Your reasons make a lot of sense lol.

I also like the fact that it’s Z2M that I can diagnose issues, it REALLY helps a lot.

Again, thank you for the help, it’s been working great! :slight_smile:

1 Like

Hi everyone! Can you please explain how to integrate/pair dimmer into z2m? I have struggled for 3 hours and didn’t find any solution! Connecting to an unspecified hub after hard resetting from the manual and Touchlink do not work. And there are no instructions on the z2m page… =(

I just got a Lutron Dimmer and it would not pair from my desk to my ZZH stick about 20’ away. I moved the dimmer within inches of the ZZH, initiated pairing and it connected right away. Now to try this blueprint…

So my Aurora dimmer’s attributes don’t match this template.
I am seeing:

        "new_state": {
            "entity_id": "sensor.lutron_dimmer_action",
            "state": "",
            "attributes": {
                "action": "brightness_move_to_level",
                "action_level": 110,
                "action_transition_time": 0.02,
                "brightness": null,
                "linkquality": 75,
                "update": {
                    "state": "idle"
                },
                "friendly_name": "Lutron DImmer action",
                "icon": "mdi:gesture-double-tap"
            },
            "last_changed": "2021-08-13T03:33:42.479392+00:00",
            "last_updated": "2021-08-13T03:33:42.480383+00:00",
            "context": {
                "id": "822426c3332b60eb8174b40dd1b6d02b",
                "parent_id": null,
                "user_id": null
            }
        }

I’ll try and fix my implementation…

This automation is working for me:

alias: Lutron Dimmer
description: ''
trigger:
  - platform: state
    entity_id: sensor.lutron_dimmer_action
condition:
  - condition: template
    value_template: '{{ trigger.to_state.attributes[''action''] == ''brightness_move_to_level'' }}'
action:
  - choose:
      - conditions:
          - condition: template
            value_template: '{{ trigger.to_state.attributes[''action_level''] == 0 }}'
        sequence:
          - type: toggle
            device_id: 3bd52319e8de1a6106f1b7f729c3ddd8
            entity_id: light.bedroom_lamps
            domain: light
    default:
      - service: light.turn_on
        data_template:
          brightness: |
            {{ trigger.to_state.attributes['action_level'] }}
        target:
          entity_id: light.bedroom_lamps
mode: queued

This worked perfectly for me. I paired the devices with Zigbee2MQTT by double tapping the center button on the aurora (following page 16 of https://www.lutron.com/TechnicalDocumentLibrary/0301916_Aurora_Advanced_Install_Guide.pdf). They paired immediately. I added this blueprint, selected the lights I wanted to control and it just worked.

From looking at the OTA tab in Zigbee2MQTT I can see the devices are running version 3.8 firmware, wit a build date of 20181019. Based on Daniel’s comment above, I had concerns about a future update impacting this somehow, so I just disabled OTA updates in the zigbee2mqtt config using:

ota:
    disable_automatic_update_check: true

Thank you.

After taking a peek at @dbrunt’s version of this, I realized it would indeed work better to use a light.toggle call for the “on” and “off” states, but that version seemed like it would only work that way for the “off” state… Not sure if that’s quite right, but I had a go at making it a bit more reliable.

My Aurora reports action_group as 6874 when a button press happens, so I’ve covered the cases where the action_level is 0 or 255, and the button was pressed.

This seems to make it more reliable for me anyways, so I’ve updated the blueprint in the OP :grin:

Thanks for making this blueprint. I just picked up a dimmer myself and I’m having a hell of a time getting it to work. First I thought is was just that the attributes were named differently. No big deal, just replace the attribute names in the blueprint with the corresponding names I get and away we go. But now I see that I don’t even have a value for “action_transition_time” at all. I’m perplexed. Is there something beyond simply pairing that was needed in Zigbee2MQTT to get it set up properly? Any help would be appreciated.

E: Quick edit to say that if I remove all mention to transition it works. The bulbs to jerk to the new brightness, so maybe that wouldn’t happen if I were to have transition time in the code. Having not experienced the proper automation, I can’t say for sure. I’m using it on an IKEA Tradfri bulb if that matters.