hello
i have a light , and i can control it via mqtt ( through node red )
inside configuration.yaml i have :
# Example configuration.yaml entry
mqtt:
- light:
name: "mqtt_json_light_eettafeltemplateversie"
schema: template
command_topic: "peha/home/rgb1/set"
command_on_template: "{ "brightness": 22, "mod": 0, "evt": 0, "cha": 0, "transition": 20, "state": "ON" }"
command_off_template: "off"
if you manipulate the Homeassistant light button ans set it on or set a value via de GUI ,
i want to recieve a payload in 1 JSON format instead of 2 separate mqtt topics .
how can i achieve this , that a user send this json to my node-red ?
{ “brightness”: 22, “mod”: 0, “evt”: 0, “cha”: 0, “transition”: 20, “state”: “ON” }
i asked chatGPT , but the solution did not work
i read the manuals , but maybe i dont understand some important details.
please who can point me in the good direction , so that my payload is json instead of string