Webhook sensor

I have recently found out about webhooks - because they’re in 0.80 - and they seem great, but I would be interested in doing a bit more with them.

Many times, webhooks notify of an event and it would be good to have this recorded in a sensor. E.g. - plex webhooks can notify when someone is watching something on Plex, and it would be good to be able to expose the details in the webhook JSON in the lovelace frontend.

I guess this is a similar concept to a MQTT JSON sensor, but it would be for information coming in in the form of a webhook?

+1 !

I guess this could be done via template sensor, but agree that it would be great if it were an official component …

Any pointers on how I would go about this?

well, it would all depend on what kind of information you need from the sensor, if it is a sensor or a binary sensor?

1 Like

Similar to how webhooks can trigger automations, I’d need the data of a POST request to an endpoint as a sensor:

curl -d "{"message": "Hello World Test"}" https://your-home-assistant:8123/api/webhook/some_hook_id

would set the some_hook_id sensor to {"type": "Hello World Test"}.

AppDaemon is supposed to be able to this, but if there’s a simply native way that’d be neat as well.