#Webhook GET

1 messages · Page 1 of 1 (latest)

stable heron
#

TLDR; Is it possible to use a webhook from an external application to GET state information of HA returned?

I'm able to use a webhook url to trigger an automation with no problem. I need it to respond with something simple like current temp from a sensor 'sensor.station_temp'. Probably in json response {"temp:59"}

quiet idol
stable heron
#

I don't see anything that refers to webhooks.

quiet idol
#

Sorry, I thought I remembered that twas how this was implemented.

hidden plaza
stable heron
#

I was able to figure this out while stumbling around.

Test using this curl cmd to get state info(the ABC... is a long-lived token):

  -H 'Authorization: Bearer ABCDEFGH'

Use this to manipulate state:

curl -X POST https://your.awesome.home/api/services/light/turn_off -H "Authorization: Bearer ABCDEFGH" -H "Content-Type: application/json" -d '{"entity_id": "light.desk_light"}'