As I understand you can use value template inside of a shell command. Here is my shell command:
shell_command:
totalconnect_zonestatus: "curl -X GET 'https://rs.alarmnet.com/TC21API/TC2.asmx/GetPanelMetaDataAndFullStatusByDeviceID?SessionID={{states.sensor.totalconnect_sessionid.state}}&DeviceID=1706447&LastSequenceNumber=0&LastUpdatedTimestampTicks=0&PartitionID=1' > /home/homeassistant/.homeassistant/totalconnect/zonestatus.xml"
When I click call service from the UI the command is never run. But if I run this command as the homeassistant user the command works and I see the zonestatus.xml created in the correct directory. Not really sure why it works from the command line and not from the UI.
Thanks in advance.
Actually nothing happened, this was the result from running the command from the command line. I deleted the curl.txt and ran the shell command from home assistant and nothing happened. This has to be a permissions issue right?
I changed the permissions of the output folder like so: sudo chmod 777 /home/homeassistant/.homeassistant/totalconnect
and now this works from home assistant: curl_test: 'curl -X GET "https://rs.alarmnet.com/TC21API/TC2.asmx/GetPanelMetaDataAndFullStatusByDeviceID?SessionID=1&DeviceID=1706447&LastSequenceNumber=0&LastUpdatedTimestampTicks=0&PartitionID=1" > /home/homeassistant/.homeassistant/totalconnect/zonestatus.xml'
but when I insert the template no file is created: totalconnect_zonestatus: 'curl -X GET "https://rs.alarmnet.com/TC21API/TC2.asmx/GetPanelMetaDataAndFullStatusByDeviceID?SessionID={{states.sensor.totalconnect_sessionid.state}}&DeviceID=1706447&LastSequenceNumber=0&LastUpdatedTimestampTicks=0&PartitionID=1" > /home/homeassistant/.homeassistant/totalconnect/zonestatus.xml'