Well, I thought this could fit into the template section
I want to check the state (and other attributes) of an entity by sending the request via mqtt as trigger to an automation rule. Like the sample code below
- action:
- data_template:
payload_template: '{{trigger.payload}}'
topic: my/got_it
service: mqtt.publish
alias: 'Fetch device state based on payload'
condition: []
id: '1516171819203'
trigger:
- platform: mqtt
topic: my/get_it
When I send ‘states.sun.sun.state’ as payload with mqtt to topic ‘my/get_it’ I expect to receive the evaluated result back in topic ‘my/got_it’
But I only receive the same string back. Any hint is very much appreciated
Best regards, Walter