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:
{“event”:{“eventId”:“c3v8minimbf5a5g12mj0”,“targetName”:“projects/bskjodneanog00f76kf0/devices/bjeis9e7gpvg00cjoapg”,“eventType”:“temperature”,“data”:{“temperature”:{“value”:27,“updateTime”:“2021-07-26T10:15:04.644000Z”,“samples”:[{“value”:27,“sampleTime”:“2021-07-26T10:15:04.644000Z”}]}},“timestamp”:“2021-07-26T10:15:04.644000Z”},“labels”:{}}
My template is:
template:
- trigger:
- platform: webhook
webhook_id: sensor_tempdt
sensor: - name: “Webhook Temperature”
state: “{{ trigger.json.temperature[‘value’] }}”
unit_of_measurement: °C
- platform: webhook
Seems like every combination I use I can’t get the value to register. Any and all help is appreciated.