Forked from bjpetit/zha_lutron_aurora_blueprint.yaml
Last active
April 17, 2021 00:36
-
-
Save genebean/2f7cfa9f14f26a811e4608ba746c841b to your computer and use it in GitHub Desktop.
Blueprint for Lutron Aurora automations in deCONZ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: deCONZ - Lutron Aurora Dimmer v1.3 | |
description: 'Control lights with a Lutron Aurora Dimmer | |
Pressing in the dimmer button will toggle between turning lights on | |
to full brightness, and turning the lights off. | |
Rotating the dimmer will increase and decrease the light brightness. | |
Adjust the sensitivity if updates from the dimmer are being sent too quickly | |
' | |
domain: automation | |
input: | |
remote: | |
name: Lutron Aurora Dimmer Switch | |
description: Lutron Aurora Z3-1BRL | |
selector: | |
device: | |
integration: deconz | |
manufacturer: Lutron | |
model: Z3-1BRL | |
entity: | |
domain: sensor | |
device_class: battery | |
light: | |
name: Light(s) | |
description: The light(s) to control | |
selector: | |
target: | |
entity: | |
domain: light | |
sensitivity: | |
name: Sensitivity | |
description: Reducing sensitivity will reduce rate of changes being sent to lights | |
default: 3 | |
selector: | |
number: | |
min: 1 | |
max: 3 | |
mode: slider | |
step: 1 | |
source_url: https://gist.github.com/genebean/2f7cfa9f14f26a811e4608ba746c841b | |
mode: restart | |
max_exceeded: silent | |
trigger: | |
- platform: event | |
event_type: deconz_event | |
event_data: | |
device_id: !input "remote" | |
action: | |
- variables: | |
sensitivity_input: !input "sensitivity" | |
selected_light: !input "light" | |
sensitivity: > | |
{% if sensitivity_input == "3" %} | |
1 | |
{% elif sensitivity_input == "2" %} | |
5 | |
{% else %} | |
15 | |
{% endif %} | |
prior_brightness: "{{ brightness | default }}" | |
command: "{{ trigger.event.data.command }}" | |
brightness: "{{ (trigger.event.data.args[0]|int) / (sensitivity|int) * (sensitivity|int) }}" | |
- choose: | |
- conditions: | |
- "{{ command == 'move_to_level_with_on_off' }}" | |
- "{{ brightness != prior_brightness }}" | |
sequence: | |
- service: light.turn_on | |
target: "{{ selected_light }}" | |
data: | |
brightness: "{{ brightness }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment