Help with JSON value template


As always I would really appreciate your help with the following. I am trying to parse a value from a JSON file but can’t get it working. The JSON file is structured like this:


The value I try to get is: 20.2 from: “outsideTemp”:20.2

I tried it like this:

        value_template: "{{ value_json.Data['plantData'].outsideTemp }}"

but no success. Thanks for your support.

Try with just

{{ }}

Edit… I see now you have capital letter D in data.

Thanks for the hint with the lower case but I am afraid it doesn’t work. The log says:

2022-07-15 20:53:10 ERROR (MainThread) [pyhap.characteristic] TargetHeatingCoolingState: value=0 is an invalid value.

No idea where this is coming from.

The complete code I am using in configuration.yaml is:

  - resource:
    method: POST
    scan_interval: 900
      submit_once: True
      resource: ''
      select: "#loginForm"
        Email: !secret elco_username
        Password: !secret elco_password
        extra: field
      - name: ElcoOutsideTemperature
        value_template: "{{ }}"
        unit_of_measurement: "°C" 

It seems I am passing the login page. But then there seems to be something wrong with the parsing. Any hint on how to debug this in more detail would be great as well. Thanks.

That is strange.
I copied the JSON and tested it in template tools and it worked there.

It is super strange. I tried to debug a bit more and when using this code:

        value_template: "{{ }}"

I get this value back:

Any idea? @Hellis81

No… very strange.
Could it be that the login doesn’t work as it should?