Commit graph

242 commits

Author SHA1 Message Date
Marc Mueller
fe21e2b8ba
Import Generator from typing_extensions (1) () 2024-06-06 17:02:13 +02:00
Sid
ac54cdcdb4
Enable Ruff RUF010 ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-08 23:54:49 +02:00
Sid
e662e3b65c
Bump ruff to 0.4.2 ()
* Bump ruff to 0.4.2

* review comments
2024-04-26 08:48:32 +02:00
J. Nick Koston
ca5ed274cb
Deprecate calling async_listen and async_listen_once with run_immediately () 2024-04-08 10:07:54 -10:00
Sid
f7b7f74d10
Enable Ruff TRY201 ()
* Enable Ruff TRY201

* remove redundant rules
2024-03-28 10:18:07 +01:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 ()
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
J. Nick Koston
ac80d38871
Fix flakey stream hls test () 2024-03-23 11:11:42 +01:00
J. Nick Koston
c615b52840
Refactor integration startup time to show wall clock time ()
* Refactor setup time tracking to exclude time waiting on other operations

We now exclude the import time and th time waiting on
base platforms to setup from the setup times

* tweak

* tweak

* tweak

* tweak

* adjust

* fixes

* fixes

* preen

* preen

* tweak

* tweak

* adjust

* tweak

* reduce

* do not count integrtion platforms against their parent integration

* handle legacy tts platforms

* stt as well

* one more wait

* use the same pattern in all the legacy

* fix tts and stt legacy

* fix

* fix

* reduce

* preen

* entity comp does not wait for platforms

* scene blocks as well

* fix test

* test fixes

* coverage

* coverage

* coverage

* fix test

* Update tests/test_setup.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update tests/test_setup.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/setup.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* strip

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* remove complexity

* Apply suggestions from code review

* no longer works that way

* fixes

* fixes

* fixes

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-18 21:45:34 -04:00
Sid
82a60fe8ad
Enable Ruff RSE () 2024-03-18 00:40:38 +01:00
J. Nick Koston
d9bc09e93a
Migrate stream listeners to use run_immediately and eager tasks ()
None of these need to a call_soon and can shutdown a bit faster
2024-03-17 09:42:25 -07:00
Sid
d5fd005db8
Add ruff rule PIE808 () 2024-03-17 09:56:26 +01:00
Sid
69564b1a17
Add ruff rule PIE800 ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-16 16:31:30 -10:00
J. Nick Koston
4df2398b9f
Move loading of ha-av to the executor () 2024-03-15 11:02:10 +01:00
Marc Mueller
aa16a9d707
Add empty line after module docstring (3) () 2024-03-08 20:38:34 +01:00
Marc Mueller
959826c4b4
Update byte string formatting () 2024-03-08 20:32:40 +01:00
Paulus Schoutsen
f416d67d21
Remove built-in support for import_executor in manifest () 2024-03-08 12:02:32 -05:00
Marc Mueller
930a396712
Add empty line after module docstring [s] () 2024-03-08 14:33:51 +01:00
Marc Mueller
8ca127df2a
Use KEY_HASS [h-z] () 2024-03-07 18:03:44 +01:00
J. Nick Koston
dc3c7c95f7
Import stream in the executor to avoid blocking the event loop ()
* Import stream in the executor to avoid blocking the event loop

This one has some large deps

* one more place

* avoid call if no change

* just in case
2024-03-02 22:00:28 -05:00
Marc Mueller
5f8ef37f2d
Update pylint to 3.0.4 ()
* Update pylint to 3.0.4

* Use yield from

* Remove unnecessary pylint disable comments
2024-02-23 23:46:00 +01:00
Marc Mueller
438d3b01b9
Use builtin TimeoutError [o-s] () 2024-02-05 12:14:37 +01:00
Aarni Koskela
706add4a57
Switch formatting from black to ruff-format ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
J. Nick Koston
7fe2bfa990
Revert "Update numpy to 1.26.1" () 2023-10-15 05:42:25 -10:00
Marc Mueller
1f1a27d6a5
Update numpy to 1.26.1 () 2023-10-14 16:30:43 -10:00
uvjustin
d40a08958d
Use dataclasses instead of attrs in stream () 2023-09-30 09:46:30 +02:00
Jan Bouwhuis
26ba10f4e4
Use dataclass for stream segment Part ()
* Use data class for stream segement Part

* use slots
2023-09-29 21:07:30 +02:00
Raman Gupta
067b94899f
Move EVENT_LOGGING_CHANGED to constants ()
* Move EVENT_LOGGING_CHANGED to constants

* fix test

* remove logger as dependency for bluetooth and fix test
2023-09-27 01:06:14 -04:00
Marc Mueller
48f9a38c74
Update numpy to 1.26.0 () 2023-09-17 09:49:21 -05:00
uvjustin
5021c69886
Update Stream logging on EVENT_LOGGING_CHANGED () 2023-09-12 19:38:11 +02:00
uvjustin
407aa31adc
Generate Stream snapshots using next keyframe ()
* Add wait_for_next_keyframe option to stream images
Add STREAM_SNAPSHOT to CameraEntityFeature
Use wait_for_next_keyframe option for snapshots using stream

* Update stream test comments

* Add generic camera snapshot test

* Get stream still images directly in camera
Remove getting stream images from generic, nest, and ONVIF
Refactor camera preferences
Add use_stream_for_stills setting to camera
Update tests

* Only attempt to get stream image if integration supports stream

* Use property instead of entity registry setting

* Split out getting stream prerequisites from stream_source in nest

* Use cached_property for rtsp live stream trait

* Make rtsp live stream trait NestCamera attribute

* Update homeassistant/components/nest/camera.py

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* Change usage of async_timeout

* Change import formatting in generic/test_camera

* Simplify Nest camera property initialization

---------

Co-authored-by: Allen Porter <allen.porter@gmail.com>
2023-08-26 10:39:40 -07:00
Ville Skyttä
9da192c752
Avoid use of datetime.utc* methods deprecated in Python 3.12 ()
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2023-08-24 16:38:22 +02:00
Marc Mueller
a9ade1f84d
Use asyncio.timeout [core] () 2023-08-15 08:36:05 -05:00
Marc Mueller
ff0566b11f
Fix deque import () 2023-08-11 23:07:06 +02:00
Marc Mueller
68cb7a7dde
Update ha-av to 10.1.1 () 2023-07-30 18:40:38 +02:00
Marc Mueller
77f38e33e5
Import names from typing instead of typing_extensions [3.11] () 2023-07-22 17:03:44 -05:00
uvjustin
3e58e1987c
Avoid infinite loop on corrupt stream recording ()
* Avoid infinite loop on corrupt stream recording

* Update tests
2023-07-19 09:06:04 +02:00
Franck Nijhof
372687fe81
Update PyTurboJPEG to 1.7.1 () 2023-07-07 08:02:47 -10:00
uvjustin
67515f8ac3
Bump ha-av to v10.1.0 () 2023-05-24 08:28:04 +02:00
Erik Montnemery
23fa500406
Sort manifests 9 () 2023-02-08 20:22:30 +01:00
Marc Mueller
ea4e2ab4aa
Add Self typing (4) [mypy 1.0] () 2023-02-06 22:30:22 -06:00
Franck Nijhof
3d557b5583
Collection of code styling tweaks () 2023-02-04 12:52:26 -05:00
Franck Nijhof
fcb612cd6f
Collection of code styling tweaks () 2023-02-03 23:51:27 +01:00
Franck Nijhof
ca1a12898c
Enable Ruff D212 () 2023-02-03 23:08:48 +01:00
uvjustin
c15f4ad648
Update stream timestamp discontinuity check with audio () 2023-01-23 16:27:09 +01:00
Marc Mueller
077ca97ef8
Fix local_partial_types errors ()
Fix local_partial_types errors
2023-01-23 10:29:11 +01:00
uvjustin
d0153f5031
Detect timestamp discontinuity in stream ()
fixes undefined
2023-01-23 10:09:46 +01:00
uvjustin
8e117ee499
Pass frag_duration as integer ()
fixes undefined
2023-01-22 17:28:17 +01:00
Franck Nijhof
79b52a2b41
Stricter pylint message control () 2023-01-20 13:47:55 +01:00
Franck Nijhof
f39f3b612a
String formatting and max line length - Part 5 ()
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2022-12-23 16:43:17 +01:00
Marc Mueller
63d519c1a8
Spelling updates () 2022-11-28 16:51:43 +01:00