When I run this script through the run script button:
sequence:
- action: mqtt.publish
metadata: {}
data:
qos: "1"
retain: false
topic: zigbee2mqtt/ir 3v branco quarto/set/ir_code_to_send
payload: {{ ir_text }}
alias: mqtt publish test power (Duplicate)
description: ""
fields:
ir_text:
selector:
text: null
name: ir_text
required: true
it gives the error:
Failed to perform the action script/mqtt_publish_test_power_duplicate. value should be a string for dictionary value @ data[‘payload’]
and then the script becomes
sequence:
- action: mqtt.publish
metadata: {}
data:
qos: "1"
retain: false
topic: zigbee2mqtt/ir 3v branco quarto/set/ir_code_to_send
payload:
"[object Object]": null
alias: mqtt publish test power (Duplicate)
description: ""
fields:
ir_text:
selector:
text: null
name: ir_text
required: true
I dont even have the chance to put the ir_text input. Calling from a button with a text also gives this and changes the script. Why?