178 lines
5.8 KiB
YAML
178 lines
5.8 KiB
YAML
blueprint:
|
|
name: Hue dimmer automation via hue integration
|
|
description: Hue dimmer automation via hue integration
|
|
domain: automation
|
|
input:
|
|
switch:
|
|
selector:
|
|
device:
|
|
filter:
|
|
model: Hue dimmer switch
|
|
button1_section:
|
|
name: Button 1
|
|
collapsed: true
|
|
input:
|
|
button1_short_press:
|
|
name: Button 1 short press
|
|
default:
|
|
selector:
|
|
action:
|
|
button1_long_press:
|
|
name: Button 1 long press
|
|
default:
|
|
selector:
|
|
action:
|
|
button1_hold:
|
|
name: Button 1 hold
|
|
default:
|
|
selector:
|
|
action:
|
|
button2_section:
|
|
name: Button 2
|
|
collapsed: true
|
|
input:
|
|
button2_short_press:
|
|
name: Button 2 short press
|
|
default:
|
|
selector:
|
|
action:
|
|
button2_long_press:
|
|
name: Button 2 long press
|
|
default:
|
|
selector:
|
|
action:
|
|
button2_hold:
|
|
name: Button 2 hold
|
|
default:
|
|
selector:
|
|
action:
|
|
button3_section:
|
|
name: Button 3
|
|
collapsed: true
|
|
input:
|
|
button3_short_press:
|
|
name: Button 3 short press
|
|
default:
|
|
selector:
|
|
action:
|
|
button3_long_press:
|
|
name: Button 3 long press
|
|
default:
|
|
selector:
|
|
action:
|
|
button3_hold:
|
|
name: Button 3 hold
|
|
default:
|
|
selector:
|
|
action:
|
|
button4_section:
|
|
name: Button 4
|
|
collapsed: true
|
|
input:
|
|
button4_short_press:
|
|
name: Button 4 short press
|
|
default:
|
|
selector:
|
|
action:
|
|
button4_long_press:
|
|
name: Button 4 long press
|
|
default:
|
|
selector:
|
|
action:
|
|
button4_hold:
|
|
name: Button 4 hold
|
|
default:
|
|
selector:
|
|
action:
|
|
triggers:
|
|
- event_type: state_changed
|
|
event_data:
|
|
entity_id: "{{ var_button1 }}"
|
|
trigger: event
|
|
id: button1
|
|
- event_type: state_changed
|
|
event_data:
|
|
entity_id: "{{ var_button2 }}"
|
|
trigger: event
|
|
id: button2
|
|
- event_type: state_changed
|
|
event_data:
|
|
entity_id: "{{ var_button3 }}"
|
|
trigger: event
|
|
id: button3
|
|
- event_type: state_changed
|
|
event_data:
|
|
entity_id: "{{ var_button4 }}"
|
|
trigger: event
|
|
id: button4
|
|
conditions: []
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: template
|
|
value_template: >-
|
|
{{ trigger.id == "button1" and trigger.event.data.new_state.attributes.event_type == "short_release"}}
|
|
sequence: !input button1_short_press
|
|
- conditions:
|
|
- condition: template
|
|
value_template: >-
|
|
{{ trigger.id == "button1" and trigger.event.data.new_state.attributes.event_type == "long_press"}}
|
|
sequence: !input button1_long_press
|
|
- conditions:
|
|
- condition: template
|
|
value_template: >-
|
|
{{ trigger.id == "button1" and trigger.event.data.new_state.attributes.event_type == "repeat"}}
|
|
sequence: !input button1_hold
|
|
- conditions:
|
|
- condition: template
|
|
value_template: >-
|
|
{{ trigger.id == "button2" and trigger.event.data.new_state.attributes.event_type == "short_release"}}
|
|
sequence: !input button2_short_press
|
|
- conditions:
|
|
- condition: template
|
|
value_template: >-
|
|
{{ trigger.id == "button2" and trigger.event.data.new_state.attributes.event_type == "long_press"}}
|
|
sequence: !input button2_long_press
|
|
- conditions:
|
|
- condition: template
|
|
value_template: >-
|
|
{{ trigger.id == "button2" and trigger.event.data.new_state.attributes.event_type == "repeat"}}
|
|
sequence: !input button2_hold
|
|
- conditions:
|
|
- condition: template
|
|
value_template: >-
|
|
{{ trigger.id == "button3" and trigger.event.data.new_state.attributes.event_type == "short_release"}}
|
|
sequence: !input button3_short_press
|
|
- conditions:
|
|
- condition: template
|
|
value_template: >-
|
|
{{ trigger.id == "button3" and trigger.event.data.new_state.attributes.event_type == "long_press"}}
|
|
sequence: !input button3_long_press
|
|
- conditions:
|
|
- condition: template
|
|
value_template: >-
|
|
{{ trigger.id == "button3" and trigger.event.data.new_state.attributes.event_type == "repeat"}}
|
|
sequence: !input button3_hold
|
|
- conditions:
|
|
- condition: template
|
|
value_template: >-
|
|
{{ trigger.id == "button4" and trigger.event.data.new_state.attributes.event_type == "short_release"}}
|
|
sequence: !input button4_short_press
|
|
- conditions:
|
|
- condition: template
|
|
value_template: >-
|
|
{{ trigger.id == "button4" and trigger.event.data.new_state.attributes.event_type == "long_press"}}
|
|
sequence: !input button4_long_press
|
|
- conditions:
|
|
- condition: template
|
|
value_template: >-
|
|
{{ trigger.id == "button4" and trigger.event.data.new_state.attributes.event_type == "repeat"}}
|
|
sequence: !input button4_hold
|
|
|
|
mode: single
|
|
trigger_variables:
|
|
var_switch: !input switch
|
|
var_button1: "{{ device_entities(var_switch)[1] }}"
|
|
var_button2: "{{ device_entities(var_switch)[2] }}"
|
|
var_button3: "{{ device_entities(var_switch)[3] }}"
|
|
var_button4: "{{ device_entities(var_switch)[4] }}" |