Commit graph

34 commits

Author SHA1 Message Date
Sid
0d66d298ec
Enable Ruff RET504 (#114528)
* Enable Ruff RET504

* fix test

* Use noqa instead of cast

* fix sonos RET504

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
Marc Mueller
0f03079065
Update import for EventStateChangedData [i-z] (#114900) 2024-04-04 11:48:29 -10:00
Marc Mueller
816ce116bf
Remove unnecessary functools.cached_property backport (#114239) 2024-04-04 11:24:26 +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
82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Sid
6ee273a548
Clean up unneeded ruff noqa directives (#113616) 2024-03-16 09:48:37 -10:00
On Freund
b644c03fa7
Send keep-alive frames in image proxy stream (#113542) 2024-03-15 14:00:33 -10:00
J. Nick Koston
d0d1af8991
Improve performance of image streams (#112810) 2024-03-09 10:26:48 -10:00
Marc Mueller
cef20506dc
Replace EventType with Event [missing] (#112753) 2024-03-08 21:56:42 +01:00
Marc Mueller
8809d3aa88
Add empty line after module docstring [g-i] (#112699) 2024-03-08 08:52:48 -05:00
Marc Mueller
8ca127df2a
Use KEY_HASS [h-z] (#112610) 2024-03-07 18:03:44 +01:00
On Freund
979fe57f7f
Image entity media source (#104743)
* Image entity media source

* MJPEG streaming

* Update on change rather than fixed interval

* Only send boundary twice

* return when image has no data

* Write each frame twice

* Use friendly name when browsing

* Fix sending of double frame

* Initial image proxy test

* Improve proxy stream test

* Refactor

* Code review fixes
2024-02-26 19:04:25 +01:00
Marc Mueller
7a89e58873
Use builtin TimeoutError [e-i] (#109679) 2024-02-05 12:00:37 +01:00
J. Nick Koston
85e9bc6f5a
Add support for attribute caching to the image platform (#106333) 2023-12-23 14:27:14 -10:00
Erik Montnemery
104bcc64b7
Allow inheriting base component entity descriptions in frozen dataclasses (#105512)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-15 23:33:50 -10:00
Erik Montnemery
df73850f56
Move definition of attributes excluded from history to entity classes (#100430)
* Move definition of attributes excluded from history to entity classes

* Revert change which should be in a follow-up PR

* Fix sun unrecorded attributes

* Fix input_select unrecorded attributes
2023-09-21 15:02:47 +02:00
Marc Mueller
71d985e4d6
Use asyncio.timeout [i-n] (#98450) 2023-08-15 14:32:15 +02:00
RenierM26
c54ceb2da2
ImageEntity split load_image_from_url (#96146)
* Initial commit

* fix async_load_image_from_url
2023-07-13 17:03:26 +02:00
Erik Montnemery
190d67b56c
Improve content type handling in ImageEntity (#95365) 2023-06-27 15:28:49 +02:00
Erik Montnemery
723f6d35b0
Address late review comments on image entity URL support (#95338) 2023-06-27 13:22:59 +02:00
Erik Montnemery
90c1263501
Adjust image entity URL support (#95330) 2023-06-27 11:59:24 +02:00
Jan Bouwhuis
22f29e8c84
Add validation of content_type to image entity (#95248) 2023-06-27 11:46:31 +02:00
Jan Bouwhuis
98cc45ec10
Add image url support (#95301)
* Add image url support

* Use hass as parameter

* Add verify ssl parameter and improve exception handling

* Improve error handling, ignore empty URL's

* Update existing image platforms

---------

Co-authored-by: Erik <erik@montnemery.com>
2023-06-27 08:36:12 +02:00
Erik Montnemery
8e2ba81995
Add image platform to the template integration (#94928)
* Add image platform to the template integration

* Set a default name

* Fix typo

* Add tests

* Improve test coverage

* Derive content-type from fetched image
2023-06-26 15:54:51 +02:00
Erik Montnemery
5303bef83e
Add image entity component (#90564) 2023-06-19 17:03:48 +02:00
Franck Nijhof
80b3572627
Rename image integration to image_upload (#84063)
* Rename image integration to image_upload

* fix test
2022-12-16 08:16:38 -05:00
Aarni Koskela
5a6f7e66cb
Refactor + strictly-type image component (#81808)
* image: refactor size validation to use partition

* image: give _generate_thumbnail types and use partition

* image: become strictly typed
2022-11-09 15:36:03 +01:00
Ville Skyttä
939fde0a50
ConfigType and async_setup/setup type hint improvements (#54739) 2021-08-18 13:22:05 +02:00
Michael
b1138b1aab
Add constructor return type in integrations E-K (#50902) 2021-05-20 18:47:30 +03:00
Marc Mueller
283b4abe67
Update typing 09 (#48059) 2021-03-18 10:02:00 +01:00
Paulus Schoutsen
4688171ce0
Add cache headers to picture integration (#39402) 2020-08-31 09:25:39 +02:00
Ville Skyttä
b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Paulus Schoutsen
24a16ff8fe
Add image integration (#38969) 2020-08-19 11:33:04 +02:00