I’ve decided to use automations with mqtt triggers and now it works correctly with this type of setup
-
id: light-mqtt-turn-on
alias: Kitchen Light MQTT Turn On
trigger:
platform: mqtt
topic: /home/light
payload: “on”
encoding: “utf-8”
action:
service: light.turn_on
entity_id: light.kitchen -
id: light-mqtt-turn-off
alias: Kitchen Light MQTT Turn Off
trigger:
platform: mqtt
topic: /home/light
payload: “off”
encoding: “utf-8”
action:
service: light.turn_off
entity_id: light.kitchen
Can you help me to understand if it is possible to make this kind of messages in this chain “hass - mqqt broker - web app”
I send from webapp something like /home/light status and home assistant returns status (on or off) on my light?
Thanks!