Skip to content

Minor webhook and http component improvements#20295

Merged
fabaff merged 1 commit intohome-assistant:devfrom
andrewsayre:webhook_additions
Jan 21, 2019
Merged

Minor webhook and http component improvements#20295
fabaff merged 1 commit intohome-assistant:devfrom
andrewsayre:webhook_additions

Conversation

@andrewsayre
Copy link
Copy Markdown
Member

Description:

  1. In the webhook component, adds the ability to generate a webhook path portion only (`async_generate_path'). This will be used by the SmartThings component (Add SmartThings component and switch platform #20148) so it does not need to hard-code the webhook path format (or alternatively, strip the base_url, url parse..., etc...).

  2. Also updates the http component to ensure that the base_url does not end up in a trailing slash. This could happen if the user accidentally enters a trialing slash on base_url in config which then results in generating webhook paths with an unnecessary slash after the host/port (i.e. http://localhost:8123//api/webhook/...)

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@fabaff fabaff merged commit bb21cb6 into home-assistant:dev Jan 21, 2019
@ghost ghost removed the in progress label Jan 21, 2019
@andrewsayre andrewsayre deleted the webhook_additions branch January 21, 2019 19:55
@balloob balloob mentioned this pull request Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants