62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
blueprint:
|
|
name: Action on a button
|
|
description: TEST button action
|
|
domain: automation
|
|
author: Tiziano Trabattoni
|
|
input:
|
|
# button_target:
|
|
# name: Button
|
|
# selector:
|
|
# target:
|
|
# entity:
|
|
# domain: input_button
|
|
light_target:
|
|
name: Light
|
|
selector:
|
|
target:
|
|
entity:
|
|
domain: light
|
|
|
|
triggers:
|
|
- trigger: mqtt
|
|
topic: zigbee2mqtt/Pulsante-01
|
|
payload: single
|
|
value_template: "{{ value_json['action'] }}"
|
|
id: Pulsante1-single
|
|
- trigger: mqtt
|
|
topic: zigbee2mqtt/Pulsante-01
|
|
payload: double
|
|
value_template: "{{ value_json['action'] }}"
|
|
id: Pulsante1-double
|
|
|
|
conditions: []
|
|
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id:
|
|
- Pulsante1-single
|
|
sequence:
|
|
- action: light.turn_on
|
|
metadata: {}
|
|
data:
|
|
rgb_color:
|
|
- 255
|
|
- 0
|
|
- 0
|
|
brightness_pct: "{{ states('input_number.confort_light_pct') }}"
|
|
transition: 10
|
|
target: !input light_target
|
|
|
|
- conditions:
|
|
- condition: trigger
|
|
id:
|
|
- Pulsante1-double
|
|
sequence:
|
|
- action: light.turn_off
|
|
metadata: {}
|
|
data:
|
|
transition: 10
|
|
target: !input light_target
|