Skip to content

Conversation

@contagon
Copy link
Contributor

This PR closes #353 and adds a new webhook trigger defined as,

@webhook_trigger(webhook_id, str_expr=None, local_only=True, methods={"POST", "PUT"}, kwargs=None) def foo(payload): pass

When looking into this, I was hoping that webhooks trigger events, but they unfortunately don't leading to this solution. I've been using this for about a week and it seems to be working stably. I've added a few things to the tests to make sure things at least run. I'm not sure how to actually call a webhook in a test, but happy to do it if there is a way.

I also added some documentation that hopefully covers everything.

Let me know if any changes or tweaks are needed!

@craigbarratt craigbarratt merged commit 6eab8c2 into custom-components:master Jun 19, 2024
@craigbarratt
Copy link
Member

Awesome - thanks for the PR. Sorry about the delay in following up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants