Hello iam totally lost.
I have no Idea how to set the Payload for my MQTT Button.
I managed to get the correct values in my Json. But i dont know what " : ’ - is needed to write it into the config ![]()
I need the following Button config ![]()
mqtt:
- unique_id: bewaesserung_start
name: "Bewässerung starten"
command_topic: "test/relay1/cmd"
payload_press: >
{{ {"cyclic_timed_irrigation": {"total_number": 5, "irrigation_duration": states("input_number.bewasserung") | int(0), "irrigation_interval": 5}} }}
availability_topic: "wled/gaderobe/status"
qos: 0
retain: false
The {{ {“cyclic_timed_irrigation”: {“total_number”: 5, “irrigation_duration”: states(“input_number.bewasserung”) | int(0), “irrigation_interval”: 5}} }}
is working in Template Playground. But not processed via the button.