Test Button_Action blueprint created

This commit is contained in:
2025-02-01 18:41:30 +01:00
parent 046d40594d
commit a0c65ed43e

View 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