Hi!
I am using Pushovers Glances API to update a complication on my Apple Watch with a sensor value.
It works so far that if I run a curl POST with a fixed value from the command line of the raspberry pi it updates the complication just fine. And the trigger (every 30 minutes) triggers the script as well. It just doesn’t send a value.
In my Configuration.yaml I write:
shell_command:
pushmoisture: 'curl --data "token=mytoken&user=myuser&percent={{ states.sensor.tomat.attributes.moisture }}" https://api.pushover.net/1/glances.json'
The sensor I am trying to get at is usually called “sensor.tomat_moisture” (which I use for other automations) but I got this way of calling it from reading the docs and some posts here. I’ve seen another way to call that value: states.sensor.tomat.attributes[”moisture”]
but the one I went with seemed to be in use more often.
From the logs I found that the value that is actually sent is: “None”. So everything is firing and authenticating, but the actual value isn’t passed on.
What did I miss?