Looks like that code is ancient in terms of Home Assistant, rest_cmd no longer exists and I have replaced it with rest_command like so:
rest_command:
openevse_rapi:
method: post
authentication: digest
username: !secret OPENEVSE_USERNAME
password: !secret OPENEVSE_PASSWORD
url: "{{ url | default('http://' ~ host ~ '/r?json=1&rapi=' ~ rapi, true) }}"
But authentication: digest
is not recognized so I have removed it.
Basically just errors:
2021-09-08 20:38:27 ERROR (MainThread) [homeassistant.helpers.template] Template variable error: 'value_json' is undefined when rendering '{{- value_json.ret -}}'
2021-09-08 20:38:38 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'host' is undefined when rendering '{{ url | default('http://' ~ host ~ '/r?json=1&rapi=' ~ rapi, true) }}'
2021-09-08 20:38:38 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'rapi' is undefined when rendering '{{ url | default('http://' ~ host ~ '/r?json=1&rapi=' ~ rapi, true) }}'
2021-09-08 20:38:54 WARNING (MainThread) [homeassistant.components.rest.sensor] Empty reply found when expecting JSON data
I assume this worked ages ago but not since HA is updated so frequently.