I do not find in the topics of this forum or in the doc the exact way to send mqtt data from home assistant using 'cmd'
On a mqtt tracker I see the messages so mqtt is correctly configured. On Esp1 this is the configuration When I use the MQTT helper I can receive the message from HA
I tried following without success :
Code: Select all
- service: mqtt.publish
data_template:
topic: 'Esp1/cmd'
retain: true
payload: 'event:ha_start'
Code: Select all
- service: mqtt.publish
data_template:
topic: 'Esp1/cmd'
retain: true
payload: 'event,ha_start'
Code: Select all
- service: mqtt.publish
data_template:
topic: 'Esp1/control?cmd'
retain: true
payload: 'event,ha_start'
Code: Select all
On ha_start do
event,publish_data
endon
Thanks in advance for your help
Patou