Help I’m Stumpped.
I’ve read the docs searched the forum but still stumpped
I’m trying to create a blueprint which will run some actions based on mqtt trigger.
Below is the bottom part of blueprint.
How do I pass the result of the trigger payload to the action block.
I know the device works and if I listen to the mqtt it does pass the “on”, “off”, etc.
…
…
…
’ mode: restart
max_exceeded: silent
trigger_variables:
base_topic: !input base_topic
controller: !input controller
trigger:
- platform: mqtt
topic: ‘{{ base_topic ~ ‘’/’’ ~ controller ~ ‘’/action’’ }}’
action: - variables:
command: ‘{{ trigger.topic }}’ <---- This is probably wrong - choose:
- conditions:
- ‘{{ command == “on” }}’
sequence: !input button_on
- ‘{{ command == “on” }}’
- conditions:
- ‘{{ command == “off” }}’
sequence: !input button_off
- ‘{{ command == “off” }}’
- conditions:
- ‘{{ command == “brightness_move_up” }}’
sequence: !input button_on_long_press
- ‘{{ command == “brightness_move_up” }}’
- conditions:
- ‘{{ command == “brightness_move_down” }}’
sequence: !input button_off_long_press
- ‘{{ command == “brightness_move_down” }}’
- conditions:
- ‘{{ command == “brightness_stop” }}’
sequence: !input button_long_press_stop
’
- ‘{{ command == “brightness_stop” }}’
- conditions: