Accessing External Data by API - This used to work - did I miss a breaking change?

The below used to work to return data from the API for my Thermostat - It has been modified to use the ID and Key form their published API.

# Single API call  
# Data - Kitchen
- platform: rest
  name: BW Data Thermostat Downstairs
    - timestamp
    - oat
    - oah
    - iat
    - sp
    - mode
    - act
    - act_sp
    - wind
    - solar
  value_template: "{{ value_json.timestamp |int}}"
  scan_interval: 900

Plugging the resource into a browser does return data:


But when plugged into the Developer Tool Template editor it tells me “UndefinedError: ‘value_json’ is undefined”.

That leads me to focus on the value_template format. Was that changed in the last 18 months?

That works

{% set value_json = {"timestamp":1690714953,"iat":76,"iah":0,"act":1,"mode":0,"sp":null,"act_sp":null,"hold":0,"fan":0,"oat":61,"oah":76,"wind":5,"solar":21,"door":0,"relay_w2":0,"relay_y2":0,"in1":1,"in2":76,"in3":61} %}
{{ value_json.timestamp |int}}


So your issue is elsewhere…

Not following - the source API is producing the string when requested. HA is telling me that “'value_json is undefined”.

That appears to indicate that the issue is in the ingestion of the data.

The template editor does not make the rest call, so value_json is sure to be undefined.

That not how the tool works.
As you can see in your sensor, the actual template section is just: {{ value_json.timestamp | int}}
Everything else is going to be ignored. So value_json is empty at that point.

For example:

This will do nothing
Just text
    - name: "this tool does not care"
      state: {{ states('switch.relay_1_relay') }}

Will output:

Result type: string
This will do nothing
Just text
    - name: "this tool does not care"
      state: off
This template listens for the following state changed events:

Entity: switch.relay_1_relay

So you need to use an active entity or provide the data yourself like koying did.

Thats how you test out your template by providing the data.
Does anything show up in your error logs?