'value_json' is undefined when rendering

Yeah, it’s really strange.

I’ve changed the switch to your suggestion above and it now seems to be working correctly and no longer throws the error.

Thanks for your help!

1 Like

In case you care, I’ve created a sensor using exactly the same JSON as from your API and it reads just fine. The only thing we’ve not looked at is headers. Would you mind pasting the response for:

curl -v -X GET http://192.168.207.98/getParameters
# curl -v -X GET http://192.168.207.98/getParameters

Note: Unnecessary use of -X or --request, GET is already inferred.

* Trying 192.168.207.98:80...

* Connected to 192.168.207.98 (192.168.207.98) port 80 (#0)

> GET /getParameters HTTP/1.1

> Host: 192.168.207.98

> User-Agent: curl/7.88.1

> Accept: */*

>

< HTTP/1.1 200 OK

< Content-Length: 298

< Content-Type: application/json

< Connection: close

< Accept-Ranges: none

<

* Closing connection 0

{"type":"parameters","list":[{"vehicleState":1,"evseState":false,"maxCurrent":20,"actualCurrent":13,"actualPower":0,"duration":2000,"alwaysActive":false,"lastActionUser":"API","lastActionUID":"API","energy":0,"mileage":0,"meterReading":0,"currentP1":0,"currentP2":0,"currentP3":0,"useMeter":true}]}

As I said before, my switch:

works fine, I just got the error right after starting HA.