I have a sensor
- platform: template
sensors:
mmjokesname:
value_template: "module_11_MMM-icanhazdadjoke"
and a switch
mmjokestest:
command_off: 'curl "http://192.168.0.66:8080/remote?action=SHOW&module={{states.sensor.mmjokesname.state}}"'
command_on: 'curl "http://192.168.0.66:8080/remote?action=HIDE&module={{states.sensor.mmjokesname.state}}"'
I want to reference the sensor value in the switch because the value can change if I add something to my Magic Mirror. I have multiple items like this and thought this would the the easiest way to accomplish this. But it does not work, it just sends a command like the above and does not replace the {{…}} with the actual sensor state.
Is this the best way to do this? What am I doing wrong?