I’m trying to create a Blueprint with MQTT:Publish sending commands through a Input text
blueprint:
name: Test send cmnd MQTT with Blueprint
description: Test
domain: automation
input:
send_command:
name: Button of send commands
description: This button will send command through MQTT
selector:
entity:
domain: input_button
machine:
name: Device that will receive the command
description: This device will receive the command when the button is pressed
default: ""
mode: single
alias: bese model blueprint
description: ""
trigger:
- platform: state
entity_id:
- !input send_command
condition: []
action:
- service: mqtt.publish
data:
qos: "2"
payload_template: |
{% set setpoint = 21 %}
{% set turn_on = "ON" %}
{% set mode = "COOL" %}
"STATUS":"{{turn_on}}","MODE":"{{mode}}","SETPOINT":{{setpoint}}
topic: cmnd/!input machine/PH_SERIAL
this is the code, but its not working, someone have an idea?