frontend
frontend copied to clipboard
Add webhook trigger allowed_methods/local_only options
Proposed change
Add Overflow menu for configuring allow_internet/allow_methods options on webhook triggers. These options are being added in https://github.com/home-assistant/core/pull/66494.
Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New feature (thank you!)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
Example configuration
automation:
trigger:
- platform: webhook
webhook_id: "some_hook_id"
allowed_methods:
- POST
- PUT
local_only: true
Additional information
- This PR fixes or closes issue: fixes https://github.com/home-assistant/core/issues/65348
- This PR is related to issue or discussion: https://github.com/home-assistant/core/pull/66494
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/21637
Checklist
- [x] The code change is tested and works locally.
- [x] There is no commented out code in this PR.
- [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for www.home-assistant.io
We cannot have 2 overflow menus. That looks weird.
We cannot have 2 overflow menus. That looks weird.
I think I misinterpreted your suggestion in https://github.com/home-assistant/core/pull/65928
Although I would even move that into the overflow menu so that we don't have to confuse the user always with it.
Did you mean to dynamically include it into the overflow menu for the ha-automation-trigger-row
? I agree that the double mdiDotsVertical
icon for the overflow menu looks odd. What would you think about just switching the icon to mdiCog
?
cog is definitely an improvement. Maybe @matthiasdebaat also has an idea for improvement.
Just a small consistency thingy maybe, we recently added a similar feature for users:

In this case, it uses: Allow only local, while this PR adds: Allow for internet.
Should we create consistency here and use same logic/wording? (As in toggle to allow local only, instead of allowing internet access).
I suspect the default is off/false for the Can only log in from the local network user feature. That's also what I was going for here too; the user would need to enable something to change the setting from the default state.
That said, changing to the same language makes sense to me. In the Python code, the existing webhook setting is local_only
. So this would also make the python side more consistent also. I'll rename the config option to be local_only
instead of allow_internet
and update the three PRs to match after work tonight.
Backend has been merged.