I want to upload my energy data to PvOutput and use a rest_command. However, something is going wrong that I can’t put my finger on. So I would like to look at the content payload of the rest_command. Below is the rest_command.
rest_command:
upload_to_pvoutput:
url: https://pvoutput.org/service/r2/addstatus.jsp
method: POST
headers:
X-Pvoutput-Apikey: !secret pvoutput_api_key
X-Pvoutput-SystemId: !secret pvoutput_system_id
Content-Type: application/x-www-form-urlencoded
payload: >-
d={{ now().strftime('%Y%m%d') }}
&t={{ now().strftime('%H:%M') }}
&c1=1
&v1={{ states('sensor.p1_meter_energy_export')| int }}
&v3={{ states('sensor.p1_meter_energy_import')| int }}
&v4={{ states('sensor.p1_meter_power') | int }}
&v5={{ states('sensor.temperatuur') | float }}
Thanks for the answer.