Hi,
I have a piece of automation set up that is triggered by multiple switches:
- alias: "IR remote commands"
trigger:
platform: state
entity_id: switch.mqtt_switch
to: "on"
action:
service: mqtt.publish
data:
topic: "viktak/spiti/livingroomir/cmnd"
payload: "something"
I understand instead of payload I can use payload_template, but the documentation is not very verbose on that…
So my question is how do I go about creating a template that sends the entity_id of the switch that triggered this action.
Sorry, I may not have been very clear: when I use only payload, then it works as expected, ie. it sends the string in the double quotes, not the actual entity id.