Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 96123

Variable value in mqtt switch payload

$
0
0

@viktak wrote:

Hi,
I’m using an mqtt switch entity with the following definition:

- platform: mqtt
  name: mySwitch
  command_topic: "cmnd"
  value_template: '{{ value_json["Data"] }}'
  qos: 1
  payload_on: '{"key": {% anotherentityofmine.state %} }'

Unfortunately, the payload that arrives to the broker is the literal string “{“key”: {% anotherentityofmine.state %} }”.
Is there a way to get the actual value of it?

Thanks for any pointers!

v

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 96123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>