Hi All,
I’m trying to get a value from an input slider, to a sensor in an irragation intergration.
I have a button which, when pressed" calls MQTT service to set the “Hose-Orchard_failsafe_duration” value.
It works when use this code extract:
I get no success. I have checked the logs and there are no errors.
I have tried many variations on the above template section, but with no results.
The input slider is setting to the correct value - checked in dev tools
If anyone can shed light on the correct code, I would really appreciate it.
Another way to achieve what you’re trying to do would be to create a script to call the service, this can accept templates. Then call the script with your button.
@eggman a script is the current way I have it setup - but @tom_l , I am (was) using a custom card, and saw the option for an “on press” event so thought I would look into making the whole thing more straight forward. Will have a look at theLovelace templates link - looks great, but am trying to walk before I fall over run
thanks for your answers - very much appreciated!