Getting Started with Webhook Integration #642
Replies: 1 comment
-
I'm dumb - was including the prefixed "-" as part of the webhook_id |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I'm fairly new to HA, and have a lot of code in Python that I would like to simplify and trigger with webhooks using HA.
I can't seem to get it to work.
I create an automation with a webhook trigger and it assigns an ID. I do not add any actions.
I have the sample code you have with the ID.
@webhook_trigger("-_spEgcdsfgyNYtsdfgWkJ7-jI0nxIV", kwargs={"extra": 10}) def webhook_payment(payload, extra): log.info(f"It ran! {payload}, {extra}")
I have logging set up as described in the example as well and do see messages from the Hello World tutorial.
When I CURL the url as per the example, I do see that the Automation triggers:
2024-10-10 07:33:37.756 INFO (MainThread) [homeassistant.components.automation.wht] WHT: Running automation actions
but I don't see that it logs "It ran!'
I see that you cannot have actions and the pyscript running at the same time, but I don't see another way to create a webhook except in the automations section.
What am I missing?
I usually figure it out by typing out my troubleshooting, but not yet!
Beta Was this translation helpful? Give feedback.
All reactions