Sensor.webhook_temperature: UndefinedError: 'dict object' has no attribute 'temperature'

guys & gals I admit failure on this one.

I’m trying to extract a simple temp value from a json file webhook. data is coming through fine. However my webhook is failing to extract the right information from the JSON file:


My template is:


  • trigger:
    • platform: webhook
      webhook_id: sensor_tempdt
    • name: “Webhook Temperature”
      state: “{{ trigger.json.temperature[‘value’] }}”
      unit_of_measurement: °C

Seems like every combination I use I can’t get the value to register. Any and all help is appreciated.

Please edit your post and format your pasted config and data as per point 11 here.

Anyway, I pasted the json data you provided into the left side of this site:

Then I had to replace all the fancy quotes “” with straight quotes "" in a text editor and try again (because you did not format your data as above).

Then I drilled down on the right hand side to obtain this path (at the top of the right hand side column):

So you need:

state: "{{['value'] }}"

The value on the end has to be in square bracket notation as that word has special meaning in templates (but you already had that bit sorted).

Wow, great response and 100% fixed my problem. Some really good tips. Many thanks.