Test Button_Action blueprint created
This commit is contained in:
61
blueprints/automation/homeassistant/button_action.yaml
Normal file
61
blueprints/automation/homeassistant/button_action.yaml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
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: 100
|
||||||
|
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
|
||||||
Reference in New Issue
Block a user