Jack Gaino
2910369647
Optionally return response data when calling services through the API ( #115046 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-07-31 21:00:04 +02:00
Erik Montnemery
5f5dcec0b9
Revert unneeded type annotation in the api integration ( #122757 )
2024-07-29 10:57:49 +02:00
Erik Montnemery
92acfc1464
Indicate database migration in /api/core/state response ( #122445 )
...
* Indicate database migration in /api/core/state response
* Change API response according to review comment
* Adjust API response
* Update test
* Add test
2024-07-23 14:13:08 +02:00
Sid
223fefbbfa
Enable Ruff RUF018 ( #115485 )
2024-04-13 09:56:33 +02:00
J. Nick Koston
ca5ed274cb
Deprecate calling async_listen and async_listen_once with run_immediately ( #115169 )
2024-04-08 10:07:54 -10:00
Marc Mueller
6116f11e6c
Use EventType for system events ( #115190 )
2024-04-08 08:25:34 -10:00
Marc Mueller
3c5089bc3f
Update import for EventStateChangedData [a-h] ( #114899 )
2024-04-04 11:48:36 -10:00
Sid
82a60fe8ad
Enable Ruff RSE ( #113695 )
2024-03-18 00:40:38 +01:00
Sid
ccd2e989c3
Enable ruff RUF005 and fix occurrences ( #113589 )
2024-03-16 07:37:20 -10:00
Marc Mueller
de886d8c49
Update EventBus listen type signatures ( #112760 )
2024-03-08 21:57:23 +01:00
Marc Mueller
25237e0377
Replace EventType with Event [a-g] ( #112739 )
2024-03-08 19:35:17 +01:00
Marc Mueller
2c06d4fcb9
Add empty line after module docstring (2) [components] ( #112736 )
2024-03-08 19:15:59 +01:00
Marc Mueller
f3594c543d
Use KEY_HASS [a-g] ( #112609 )
2024-03-07 18:09:20 +01:00
J. Nick Koston
5bf7a00989
Move DATA_LOGGING constant to homeassistant.const ( #111763 )
2024-02-28 14:09:51 -10:00
J. Nick Koston
93d56cc105
Enable compression on error log api ( #110865 )
2024-02-18 20:12:30 +01:00
J. Nick Koston
9cf45882a7
Use bytes join fast path for large states payload ( #110694 )
...
b"".join has a fast path for when there are more than two bytes-strings
to combine
f383ca1a6f/Objects/stringlib/join.h (L123)
2024-02-16 07:58:11 +01:00
Marc Mueller
c82933175d
Use builtin TimeoutError [a-d] ( #109678 )
2024-02-05 11:31:33 +01:00
Jan-Philipp Benecke
0a0d4c37a9
Use constants instead of literals for api ( #105955 )
2024-01-29 18:09:00 +01:00
J. Nick Koston
8c71abe421
Avoid json encoder default fallback for APIComponentsView ( #108359 )
2024-01-19 13:44:29 +01:00
Marc Mueller
15bd31e8d8
Enable strict typing for api ( #108363 )
2024-01-19 13:33:20 +01:00
Marc Mueller
25b7bb4a4f
Adjust require_admin decorator typing ( #108306 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-18 14:12:14 -10:00
Marc Mueller
7c6fe31505
Improve api typing ( #108307 )
2024-01-18 12:45:15 -10:00
J. Nick Koston
60ab360fe7
Avoid bytes to string to bytes conversion in websocket api ( #108139 )
2024-01-16 21:37:34 +01:00
J. Nick Koston
d04e2d56da
Add support for JSON fragments ( #107213 )
2024-01-07 17:36:31 -10:00
J. Nick Koston
dfed10420c
Remove aiohttp enable_compression helper ( #104174 )
2023-11-29 10:24:34 -07:00
Martin Hjelmare
e884933dbd
Remove rest api service call timeout ( #104709 )
2023-11-29 14:46:19 +01:00
J. Nick Koston
0d63e2f9b5
Ensure large payloads are compressed in the executor with aiohttp 3.9.0 ( #103592 )
2023-11-07 12:37:54 -06:00
Denis Shulyaka
d18b2d8748
Shield service call from cancellation on REST API connection loss ( #102657 )
...
* Shield service call from cancellation on connection loss
* add test for timeout
* Apply suggestions from code review
* Apply suggestions from code review
* fix merge
* Apply suggestions from code review
2023-11-02 12:58:26 +01:00
J. Nick Koston
78e546b35a
Avoid enumerating the whole state machine on api service calls ( #103147 )
2023-11-01 10:25:02 +01:00
J. Nick Koston
547f32818c
Make core States use cached_property ( #100312 )
...
Need to validate this is worth removing __slots__
2023-09-13 20:33:25 -04:00
J. Nick Koston
5e81499855
Avoid json_decoder_fallback in /api/states ( #100018 )
2023-09-10 08:25:23 -05:00
Erik Montnemery
368acaf6fd
Improve error handling in /api/states POST ( #99810 )
2023-09-07 13:33:38 +02:00
J. Nick Koston
d2a52230ff
Speed up responding to states being polled via API ( #99621 )
...
* Speed up responding to states being polled via API
Switch to using `as_dict_json` to avoid serializing states over and over when the
states api is polled since the mobile app is already building the cache as it also
polls the states via the websocket_api
* Speed up responding to states being polled via API
Switch to using `as_dict_json` to avoid serializing states over and over when the
states api is polled since the mobile app is already building the cache as it also
polls the states via the websocket_api
* fix json
* cover
2023-09-04 16:51:19 -04:00
J. Nick Koston
acd9cfa929
Speed up calls to the all states api ( #99462 )
2023-09-02 12:08:07 -05:00
J. Nick Koston
262483f3f6
Replace async_timeout with asyncio.timeout A-B ( #98415 )
2023-08-15 10:29:28 +02:00
Robert Resch
b0f68f1ef3
Use @require_admin decorator ( #98061 )
...
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2023-08-14 15:07:20 +02:00
J. Nick Koston
29aa89bea0
Add lightweight API to get core state ( #96860 )
2023-07-19 20:31:48 +02:00
Erik Montnemery
8053073a77
Add empty config schema to integrations a-c ( #93608 )
2023-05-29 14:38:33 -04:00
J. Nick Koston
48b93e03ee
Cache transient templates compiles provided via api ( #89065 )
...
* Cache transient templates compiles provided via api
partially fixes #89047 (there is more going on here)
* add a bit more coverage just to be sure
* switch method
* Revert "switch method"
This reverts commit 0e9e1c8cbe
.
* tweak
* hold hass
* empty for github flakey
2023-03-02 21:31:12 -05:00
epenet
ba23816a0c
Inverse json import logic ( #88099 )
...
* Fix helpers and util
* Adjust components
* Move back errors
* Add report
* mypy
* mypy
* Assert deprecation messages
* Move test_json_loads_object
* Adjust tests
* Fix rebase
* Adjust pylint plugin
* Fix plugin
* Adjust references
* Adjust backup tests
2023-02-16 11:37:57 +01:00
Erik Montnemery
231aad7a68
Sort manifests 1 ( #87022 )
2023-02-08 20:29:44 +01:00
Franck Nijhof
2b27cfdabb
Set system & entity integration types ( #79593 )
2022-10-04 10:36:42 -04:00
J. Nick Koston
6c41a10142
Switch api and event stream to use json helper ( #73868 )
2022-06-22 20:13:02 -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
J. Nick Koston
fe6a4bfb1d
Remove EVENT_TIME_CHANGED and EVENT_TIMER_OUT_OF_SYNC ( #69643 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-04-09 09:05:54 -10:00
Joakim Sørensen
04c5e51cbd
Remove the deprecated discovery_info endpoint ( #64534 )
2022-01-20 13:46:48 +01:00
epenet
6a67143732
Add setup type hints [a] ( #63424 )
...
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-05 14:15:57 +01:00
J. Nick Koston
10d6247fee
Bump to aiohttp 3.8.0 ( #58974 )
2021-11-04 10:07:50 -05:00
Marc Mueller
2b72b7b7b9
Use assignment expressions 09 ( #57790 )
2021-10-17 20:19:56 +02:00
Ville Skyttä
d8d34fdd3b
Prefer HTTPStatus over int in HA view JSON functions ( #56504 )
...
* Prefer HTTPStatus over int in HA view JSON functions
* Update zwave tests to not expect a fixed typo
2021-09-22 21:59:52 +03:00