Commit Graph

155 Commits (f88b24f8a4a395e8b13cc18962fe49ab15af1ce8)

Author SHA1 Message Date
epenet fbaba3753b
Fix root-import pylint warning in components (#119294)
* Fix root-import pylint warning in components

* Adjust

* Adjust
2024-06-10 15:14:49 +02:00
epenet 1ebc1685f7
Improve type hints in camera tests (#119264) 2024-06-10 09:30:00 +02:00
epenet 092cdcfe91
Improve type hints in tests (a-h) (#118379) 2024-05-30 08:46:18 +02:00
J. Nick Koston 0b3627b59e
Add additional cached_property to camera entities (#115075) 2024-04-13 16:50:11 -05:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
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 9cc0006b92
Ensure TurboJPEG is imported in the executor (#113504)
The import was too late and it eneded up being imported
in the event loop
2024-03-15 12:23:53 +01:00
On Freund b9837a561b
Use friendly name for camera media source (#110882) 2024-03-12 21:20:14 +01:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
On Freund e879ab0eef
Show WebRTC cameras that also support HLS in the media browser (#108796)
* Show WebRTC cameras in the media browser

* Only show webrtc cameras with source in the browser

* Address code review

* Refactor BrowseMediaSource creation

* Refactor

* Address code review
2024-02-18 10:12:08 -08:00
Marc Mueller c82933175d
Use builtin TimeoutError [a-d] (#109678) 2024-02-05 11:31:33 +01:00
Erik Montnemery c805ea7b4f
Include deprecated constants in wildcard imports (#107114) 2024-01-05 11:46:45 +01:00
J. Nick Koston 6506a8d511
Camera platform back-compat for custom components without CameraEntityFeature (#106529) 2023-12-29 00:45:35 +01:00
J. Nick Koston abd3c54cbe
Add support for attribute caching to the camera platform (#106256) 2023-12-23 13:01:47 -10:00
Robert Resch 20ba764d92
Deprecate deprecated camera constants (#106095) 2023-12-23 10:46:23 +01:00
Michael 58070e14a7
Add significant Change support for camera (#105866) 2023-12-18 14:40:55 +01:00
Jan-Philipp Benecke 9ab1cb83d8
Update a-c* tests to use entity & device registry fixtures (#103793)
* Update a-c* tests to use entity & device registry fixtures

* Revert some changes

* Revert formatting

* retrigger CI
2023-11-12 13:45:30 -05:00
uvjustin 407aa31adc
Generate Stream snapshots using next keyframe (#96991)
* 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
Erik Montnemery 9a3077d64a
Always setup demo platforms with device support from config entry (#94586)
* Always setup demo platforms with device support from config entry

* Adjust test fixutres

* Update tests depending on the demo integration
2023-06-14 16:50:35 +02:00
Erik Montnemery 0126cfa9d9
Allow exposing any entity to the default conversation agent (#92398)
* Allow exposing any entity to the default conversation agent

* Tweak

* Fix race, update tests

* Update tests
2023-05-03 09:45:54 -04:00
Erik Montnemery e3c16e634b
Allow exposing entities not in the entity registry to assistants (#92363) 2023-05-02 22:08:09 +02:00
J. Nick Koston e4744199ce
Raise an exception when trying to save camera snapshots to a not allowed path (#91869) 2023-04-23 01:15:56 +02:00
J. Nick Koston d0d4ab6056
Require a list of entity ids when fetching history (#90992) 2023-04-08 16:14:44 -10:00
J. Nick Koston 1c57339ec3
Refactor recorder tests to use recorder history API (#89565) 2023-03-11 21:51:16 -05:00
Erik Montnemery 9989a4787b
Fix recorder platform tests (#88330) 2023-02-17 08:22:15 -06:00
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet fa7acb4f0d
Add type hints to integration tests (part 3) (#87844) 2023-02-10 16:05:01 +01:00
epenet 4142f0d15d
Add return type to tests without arguments (#87613)
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +01:00
uvjustin 31ad208500
Use async with to fetch HTTP streams in tests (#82788) 2022-11-27 14:35:03 -05:00
uvjustin ee910bd0e4
Refactor camera stream settings (#81663) 2022-11-13 01:22:59 +08:00
uvjustin 84725f15a6
Use IntEnum for stream orientation (#81835)
* Use IntEnum for stream orientation

* Rename enum values

* Add comments

* Fix import
2022-11-09 07:28:28 -08:00
Erik Montnemery 31a787558f
Ensure recorder test fixture is setup before hass fixture (#80528)
* Ensure recorder test fixture is setup before hass fixture

* Adjust more tests
2022-10-19 07:58:47 +02:00
uvjustin 852b0caf5b
Add orientation transforms to stream (#77439) 2022-09-06 13:31:36 +08:00
uvjustin 6540bed59d
Defer preload stream start on startup (#75801) 2022-08-08 11:15:31 -04:00
uvjustin d989e4373d
Remove websocket_api send_big_result (#75452) 2022-07-19 21:08:11 -07:00
uvjustin 73f2bca377
Make Stream.stop() async (#73107)
* Make Stream.start() async
* Stop streams concurrently on shutdown
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-06-08 00:10:53 +08:00
Erik Montnemery 5f2b4001f3
Separate recorder database schema from other classes (#72977)
* Separate recorder database schema from other classes

* fix logbook imports

* migrate new tests

* few more

* last one

* fix merge

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-06-07 14:41:43 +02:00
Erik Montnemery 47d0cc9b09
Update integrations to pass target player when resolving media (#72597) 2022-05-27 09:05:06 -07:00
uvjustin 221b77297e
Declare exports from stream explicitly (#71898) 2022-05-15 17:58:57 +02:00
Erik Montnemery 28ebab9c5a
Simplify waiting for recorder in tests (#70647) 2022-04-25 12:04:47 +02:00
Erik Montnemery 982e314de6
Use recorder_mock in tests (#70363)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-04-22 19:29:44 -10:00
Franck Nijhof c93c7e8eff
Replace Camera STREAM_ constants with StreamType enum (#69871) 2022-04-11 16:27:27 -07:00
J. Nick Koston 522a9bb6b1
Exclude supported features and attribution from being recorded in the database (#69165) 2022-04-03 13:51:42 +02:00
Franck Nijhof 93571c2d01
Add EntityFeature enum to Camera (#69072) 2022-04-01 09:38:03 -07:00
J. Nick Koston f5a13fc51b
Add ability to exclude attributes from being recorded by entity domain (#68824) 2022-03-29 20:13:08 -07:00
J. Nick Koston 8e3454e46a
Remove legacy compatiblity for camera platforms that do not support width/height (#68039)
- async_camera_image or camera_image must accept the width and
  height arguments
2022-03-12 20:47:14 +02:00
Paulus Schoutsen 7e4b63690d
Fix camera content type while browsing (#67256) 2022-02-26 10:02:13 +01:00
Paulus Schoutsen 0a6c8f8e6c
Improve not shown handling (#67247) 2022-02-25 11:52:14 -08:00
Paulus Schoutsen fec8c2ab82
Add support for MJPEG cameras to camera media source (#66499) 2022-02-14 17:04:19 +01:00
Paulus Schoutsen 716a1e2a64
Add camera media source (#65977) 2022-02-08 14:32:02 -08:00
Paulus Schoutsen 08083f399e
Convert some tests to async and drop usage get_test_home_assistant (#64394)
* Fix some tests

* Update MS tests

* Convert last logbook tests to async
2022-01-18 19:37:17 -08:00