I’m a beginner at HA and trying to learn and expand my knowledge by developing some real world examples.
I currently have a call which sends values from Zwave sensors to an API receiver on an IIS server.
The API receiver on the IIS server is configured to return a unique identifier for each value that is sent. I would like to collect this value and write it to a log file (so I can check to make sure all values are recorded successfully.
The rest command in my configuration.yaml is very simple:
rest_command:
#make a rest api call with a variable value i.e. lux
ccc_send_value:
url: "https://xxxxxx/Push/Data/{{ url_param }}{{url_value}}"
method: GET
This is called from automations set up against each sensor:
action:
- data_template:
url_param: ?R=V&A=0&M=FIBDOORTEMP&D=
url_value: '{{ states("sensor.fibaro_system_fgdw002_door_opening_sensor_2_temperature")
}}'
service: rest_command.ccc_send_value
I’ve had a look through the documentation and played around with my code, but haven’t got any closer. The data is received by the IIS server, but I am not sure how to collect the return value and write it into a file. This really isn’t my area of expertise and so I was wondering if someone might be able to give me a simple example that a noobie like me might be able to follow?