I was trying to use four buttons in lovelace, each sending their own number to a mqtt topic. Instead of making four scripts I wanted to use the data template. (never used before). I dont get any errors but the data is empty.
entity button:
- type: entity-button
name: Send number
tap_action: call-service
service: script.turn_on
entity_id: script.send_number
data_template:
number: "1"
entity: script.send_number
and my script:
send_number:
alias: 'Send Number'
sequence:
- service: mqtt.publish
data_template:
topic: "homeassistant/pixelDisplay"
payload: '{{number}}'
qos: '0'
retain: 'false'
Can anyone see what I am doing wrong