Forked from STRML/zha-lutron-aurora-smart-area-blueprint.yaml
Last active
October 12, 2024 22:35
-
-
Save DallonTG/66beb19cbfa7e44de2cfaa7904325392 to your computer and use it in GitHub Desktop.
HASS Blueprint | ZHA - Lutron Aurora Dimmer (Switch Edition)
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: ZHA - Lutron Aurora Dimmer (Switch Edition) | |
| description: Control a switch or group of switches with a Lutron Aurora dimmer. | |
| domain: automation | |
| input: | |
| remote: | |
| name: Lutron Aurora Dimmer Switch | |
| description: Lutron Aurora Z3-1BRL | |
| selector: | |
| device: | |
| integration: zha | |
| manufacturer: Lutron | |
| model: Z3-1BRL | |
| entity: | |
| domain: sensor | |
| device_class: battery | |
| light: | |
| name: Light(s) or Entitie(s) | |
| description: The light(s), group, or entity(s) to control. | |
| selector: | |
| entity: {} | |
| sensitivity: | |
| name: Sensitivity | |
| description: Reducing sensitivity will reduce rate of changes being sent to lights | |
| default: 3 | |
| selector: | |
| number: | |
| min: 1.0 | |
| max: 3.0 | |
| mode: slider | |
| step: 1.0 | |
| source_url: https://gist.github.com/DallonTG/66beb19cbfa7e44de2cfaa7904325392/ | |
| mode: restart | |
| max_exceeded: silent | |
| trigger: | |
| - platform: event | |
| event_type: zha_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: | |
| - condition: template | |
| value_template: '{{ command == "move_to_level_with_on_off" }}' | |
| sequence: | |
| - service: switch.toggle | |
| target: | |
| entity_id: '{{ selected_light }}' | |
| - conditions: | |
| - condition: template | |
| value_template: '{{ command == "0x00" }}' | |
| sequence: | |
| - service: switch.toggle | |
| target: | |
| entity_id: '{{ selected_light }}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment