Commit Graph
47 Commits
Author SHA1 Message Date
Josef Zweck feaf50eee7 Address Webhook async_generate_url review (#118910)
code styling
2024-06-05 22:38:23 +02:00
Josef ZweckandErik Montnemery d0a036c617 Allow more input params to webhook generate_url helper (#112334)
* allow more params to helper

* switch back to f-string

* add test

* switch to proper method

* add allow_external, internal params

* fx default

* add signature comparison

* remove test, change prefer_external

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-06-05 15:55:37 +02:00
Sid 2cc916db6d Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Sid 6587ee20db Enable Ruff TRY300 (#114437)
* Enable Ruff TRY300

* Update validation.py

* Address review comments
2024-03-30 10:37:59 +01:00
Sid 0b9c9aff62 Add ruff rules PIE790, PIE794, PIE807, PIE810 (#113617) 2024-03-16 11:04:58 -10:00
Marc Mueller cb8c14496c Use more f-strings [ruff] (#112695) 2024-03-08 18:44:42 +01:00
Marc Mueller c773d57d39 Add empty line after module docstring [w-z] (#112706) 2024-03-08 10:35:45 -05:00
Marc Mueller 8ca127df2a Use KEY_HASS [h-z] (#112610) 2024-03-07 18:03:44 +01:00
Marc Mueller 9221f5da10 Enable strict typing for webhook (#107946) 2024-01-13 09:08:26 -10:00
Robert ReschandMartin Hjelmare 852fb58ca8 Extend auth/providers endpoint and add /api/person/list endpoint for local ip requests (#103906)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-11-24 17:11:54 +01:00
Franck Nijhof 3df71eca45 Ensure webhooks take HA cloud into account (#97801)
* Ensure webhooks take HA cloud into account

* Avoid circular import
2023-08-06 23:23:52 -04:00
Eric Severance a4a6972237 Set webhook local_only deprecation to 2023.11.0 (#95401) 2023-06-27 20:43:11 +02:00
Erik Montnemery b5f5e1c8c3 Add empty config schema to integrations t-z (#93853) 2023-05-31 10:13:26 +02:00
94f35ea968 Add webhook trigger allowed_methods/local_only options (#66494)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-04-14 12:49:12 +02:00
Jarek Świerczyński 47f5160154 Allow GET in webhook triggers (#56446) 2023-04-14 09:46:00 +02:00
epenetandMarc Mueller 2c43606922 Add websocket type hints in components (#80654)
* Add websocket type hints in components

* Adjust

* Apply suggestion

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-10-20 13:41:14 +02:00
epenet 60640b4436 Add websocket type hints in components (#80533) 2022-10-18 22:15:23 -04:00
epenet 911402e747 Remove cloud from mypy ignore list (#74449) 2022-07-15 10:47:30 +02:00
Marc MuellerandJ. Nick Koston 93cbb331e5 Update Mypy to 0.950 (#70948)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-27 20:49:54 -05:00
Marc Mueller 9b9b553521 Disable no-self-use [pylint] (#70641)
* Disable no-self-use

* Remove disable comments
2022-04-25 07:41:01 -07:00
Franck Nijhof fa8238bc04 Downgrade log warning->info for unregistered webhook message (#66830) 2022-02-18 12:43:25 -08:00
epenetandepenet 44a686931e Import webhook (#64102)
* Import webhook

* Adjust webhook trigger

* Fix pylint

* Add type hints to async_handle_webhook

* Revert changes to netatmo

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-14 12:31:02 +01:00
Erik Montnemery 6eb0447566 Import websocket_api (part 3) (#63907) 2022-01-11 17:26:37 +01:00
Paulus Schoutsen 1ea3a17d89 Allow sending webhooks via WS connection (#62725) 2022-01-07 10:41:36 -08:00
Paulus Schoutsen 7872f87dd7 Allow registering a webhook as local only (#63516) 2022-01-05 23:45:02 -08:00
epenetandepenet ef02f2005a Add setup type hints [v-w] (#63484)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-05 18:23:43 +01:00
Marc Mueller aa7dc78a1e Use assignment expressions 11 (#57792) 2021-10-17 20:15:48 +02:00
Ville Skyttä cc97502a0c Use HTTPStatus instead of HTTP_* consts in aiohttp web response statuses (#56541) 2021-10-01 09:27:44 -07:00
Marc Mueller 364767ff22 Import Callable from collections.abc (4) (#56778) 2021-09-29 16:15:36 +02:00
Marc Mueller 48bada5a18 Update pylint to 2.11.1 (#56364) 2021-09-18 13:52:59 +02:00
Tobias Sauerwein 40549d9d2f Add some type hints for webhook component (#52895)
* Add some type hints

* Fix type hint

* Address comment

* Make pylint happy
2021-07-12 17:24:56 +02:00
J. Nick KostonandMartin Hjelmare c820dd4cb5 Have pylint warn when user visible log messages do not start with capital letter or end with a period (#48064)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-19 09:26:36 -05:00
cc4ebc925c Improve X-Forwarded-* request headers handling (#38696)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-11 22:57:50 +02:00
Paulus Schoutsen 3ee3ae7633 Fix cloudhooks coming in for non existing webhooks (#36836)
* Fix cloudhooks coming in for non existing webhooks

* Fix tests"
2020-06-15 16:30:40 -07:00
Franck Nijhof e3e3a113e9 async_get_url -> get_url (#35382) 2020-05-08 21:53:28 +02:00
Franck Nijhof 2223592486 Add get_url helper, deprecate base_url (#35224) 2020-05-08 02:29:47 +02:00
Martin Hjelmare 6fe00497d6 Fix webhook imports sorting (#34988) 2020-04-30 23:03:54 +02:00
Daniel Perna 6b16c34fd0 Improve logging for unregistered webhooks (#34882)
* Improve logging for unregistered webhooks

* Address comment, KEY_REAL_IP

* Address comment, read(64)

* Lint
2020-04-30 22:07:07 +02:00
springstan 8d61893c39 Use HTTP_OK constant (#33798)
* Use http ok constant

* Remove incorrect use

* Run isort

* Fix pylint by adding missing imports

* Fix pylint by fixing one import
2020-04-08 11:47:38 -05:00
Ville Skyttä 130571c478 Remove no longer needed auth.util, use secrets instead (#29861) 2019-12-12 16:46:33 +01:00
Bas Nijholt fbf1836997 Sort imports according to PEP8 for components starting with "W" (#29781) 2019-12-09 14:47:53 +01:00
Paulus Schoutsen e866d769e8 Google Assistant Local SDK (#27428)
* Local Google

* Fix test

* Fix tests
2019-10-13 14:16:27 -07:00
Paulus Schoutsen 37a3d5fd85 Add HEAD and PUT support to webhooks (#26299) 2019-08-30 20:32:38 -05:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd30889bad5adc9a4fd60059d05ba5a7.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2cc53cbe6954f940062b18ae34b05621.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Fabian Affolter 127c55e0c1 Update file header (#21023)
* Update file header

* Update file header

* Update file header

* Update file header

* Update file header

* Fix lint issues
2019-02-13 21:21:14 +01:00
Paulus Schoutsen b8cc547fa3 Move components to folders (#20774)
* Move all components into folders

* Move component tests into folders

* Fix init moving

* Move tests

* Lint

* Update coverage

* Fix service descriptions

* Update CODEOWNERS
2019-02-05 19:31:15 -08:00