Hello,
I would like to create an automation for solar charging.
To do this, I need to send the ampere value to my wallbox (go-eCharger) via HTTP post.
The call for this is for example http://192.168.x.x/mqtt?payload=amx=10.
I have created a template that provides me with the required value, depending on the production of the photovoltaics (sensor.watt_in_ampere).
What does not work, however, is sending the HTTP post. I have entered the following in configuration.yaml:
rest_command:
goecharger_set_amx:
url: http://192.168.x.x/mqtt?payload
method: POST
payload: '{"amx": "{{ sensor.watt_in_ampere }}"}'
content_type: 'application/json; charset=utf-8'
Is this correct? If so, how can I call the command?
EDIT:
This HTTP call works with an variable parameter:
rest_command:
goecharger_set_amx:
url: http://192.168.178.120/mqtt?payload=amx={{ amx_value }}
method: GET
verify_ssl: false
But I just can’t get the value of the sensor, it always sends 0.
service: rest_command.goecharger_set_amx
data:
amx_value: sensor.watt_in_ampere
What am I doing wrong?
Many thanks in advance.