fwestenberg
385b29bdf5
Add Beaufort to wind_speed ( #105795 )
...
* Add Beaufort to wind_speed
* Add Bft to UnitOfSpeed
* Update tests with Bft
* Remove check for unit
* Fix test_deprecated_constants
* Test depricated constant Beaufort
* Fix test_unit_system.py for Beaufort
* Remove _DEPRECATED_SPEED_FEET_BEAUFORT
* Remove maxsize from lru_cache
* Update test_deprecated_constants
* Update comment
* Add missing docstring
* Apply suggestions from code review
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-03-05 14:55:59 +01:00
J. Nick Koston
f59268b2ee
Include filename in exception when loading a json file fails ( #111802 )
...
* Include filename in exception when loading a json file fails
* fix
2024-02-29 10:30:29 -05:00
Marc Mueller
adbd9c8d40
Update python-slugify to 8.0.4 ( #111284 )
2024-02-27 12:29:48 +01:00
J. Nick Koston
67e356904b
Add support for eager tasks ( #111425 )
...
* Add support for eager tasks
python 3.12 supports eager tasks
reading:
https://docs.python.org/3/library/asyncio-task.html#eager-task-factory
https://github.com/python/cpython/issues/97696
There are lots of places were we are unlikely to suspend, but we might
suspend so creating a task makes sense
* reduce
* revert entity
* revert
* coverage
* coverage
* coverage
* coverage
* fix test
2024-02-26 11:36:46 -05:00
Marc Mueller
cd0ee98dba
Use builtin TimeoutError [core + helpers] ( #109684 )
2024-02-05 12:09:54 +01:00
J. Nick Koston
582d6968b2
Avoid de/recode of bytes to string to bytes when writing json files ( #109348 )
2024-02-02 09:02:26 +01:00
J. Nick Koston
8afcd53af6
Restore support for packages being installed from urls with fragments ( #109267 )
2024-02-01 08:56:57 +01:00
Robert Resch
b409933d19
Add DurationConverter ( #108865 )
...
* Add DurationConverter
* Update withings snapshots
* Add sensor test
* Fix tests
* Update snapshots after #108902 was merged
2024-01-30 23:08:12 +01:00
Joakim Plate
cece117c93
Flow rate unit conversions and device class ( #106077 )
...
* Add volume flow rate conversions
* Add missing translations
* Adjust liter unit and add gallons per minute
* Adjust to min instead of m for minutes
* Add matching class for number
* Add some tests for number and sensor platform
* Add deprecated constants
* Add explicit list of flow rate for check
This reverts commit 105171af31
.
2024-01-30 15:01:08 +01:00
Marc Mueller
030727b078
Remove deprecated event_loop fixtures in tests ( #109048 )
2024-01-29 14:24:58 +01:00
Erik Montnemery
1cb5bbf865
Fix empty files included by !include_dir_named ( #108489 )
...
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-20 15:12:32 +01:00
Pedro Lamas
6cab4486f7
Fix loading empty yaml files with include_dir_named ( #107853 )
2024-01-16 10:23:04 +01:00
J. Nick Koston
75d591593d
Remove calls to distribution and legacy zip support from package util ( #107427 )
2024-01-07 07:39:48 -10:00
Erik Montnemery
8f9bd75a36
Enable strict typing of date_time ( #106868 )
...
* Enable strict typing of date_time
* Fix parse_datetime
* Add test
* Add comments
* Update tests/util/test_dt.py
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-01-02 13:57:25 +01:00
J. Nick Koston
47f8e08261
Reduce overhead to connect dispatcher ( #105715 )
...
Reduce overhead connect dispatcher
- We tend to have 1000s (or 10000s) of connected dispatchers which
makes these prime targets to reduce overhead/memory
- Instead of creating new functions to wrap log exceptions each time
use partials which reuses the function body and only create new
arguments
Previous optimizations #103307 #93602
2023-12-16 10:16:58 +01:00
vexofp
885410bcfc
Prevent duplicate default SSLContext instances ( #105348 )
...
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-09 11:30:12 -10:00
Erik Montnemery
af715a4b9a
Add workaround for orjson not handling subclasses of str ( #105314 )
...
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-12-08 18:13:34 +01:00
Erik Montnemery
5b55c7da5f
Remove logic converting empty or falsy YAML to empty dict ( #103912 )
...
* Correct logic converting empty YAML to empty dict
* Modify according to github comments
* Add load_yaml_dict helper
* Update check_config script
* Update tests
2023-12-05 18:08:11 +01:00
Erik Montnemery
5b59e043fa
Don't use deprecated_class decorator on deprecated YAML classes ( #105063 )
2023-12-05 11:36:26 +01:00
Erik Montnemery
ae002e2f38
Remove breaks_in_ha_version from deprecated YAML classes ( #105062 )
2023-12-05 10:48:31 +01:00
Jan Bouwhuis
e8475b9b33
Add scaling utils for brightness and fanspeed ( #104753 )
...
Co-authored-by: Robert Resch <robert@resch.dev>
2023-12-04 12:10:58 +01:00
Erik Montnemery
db51a8e1f7
Allow passing breaks_in_ha_version to deprecation helper decorators ( #104985 )
2023-12-04 11:52:10 +01:00
Erik Montnemery
34d01719f2
Minor improvements of deprecation helper ( #104980 )
2023-12-04 10:47:49 +01:00
J. Nick Koston
67039e0f26
Remove monotonic_time_coarse datetime helper ( #104892 )
2023-12-04 09:10:13 +01:00
Niccolò Maggioni
0232c8dcb0
Add temperature to the light color mode parameter fallbacks ( #86026 )
...
* Add color temperature to the color mode fallbacks
* Manually add ATTR_COLOR_TEMP since ATTR_COLOR_TEMP_KELVIN is pre-parsed
* Include the legacy ATTR_COLOR_TEMP attribute in the tests
* Apply suggestions from code review
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Add citation for McCamy's approximation formula
If still existing, also see page 3 of https://www.st.com/resource/en/application_note/an5638-how-correlated-color-temperature-is-calculated-by-vd6283-stmicroelectronics.pdf
* Update homeassistant/util/color.py
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-12-01 08:26:07 +01:00
Jan Bouwhuis
1273bc8ec4
Let executor CI test pass under worse conditions ( #104849 )
2023-11-30 20:05:26 -10:00
Erik Montnemery
00e57ab9a4
Use deprecated_class decorator in deprecated YAML loader classes ( #104835 )
2023-11-30 22:43:34 +01:00
Erik Montnemery
abc05451a2
Restore renamed yaml loader classes and warn when used ( #104818 )
2023-11-30 18:14:48 +01:00
Erik Montnemery
12902b8a68
Add NodeStrClass.__voluptuous_compile__ ( #104808 )
2023-11-30 17:45:27 +01:00
J. Nick Koston
608f4f7c52
Bump aiohttp to 3.9.1 ( #104176 )
2023-11-29 16:13:54 +01:00
Erik Montnemery
f89194784d
Fix including yaml files with scalar values ( #103914 )
2023-11-13 15:23:50 +01:00
Erik Montnemery
1168956f8c
Small improvement of yaml util tests ( #103853 )
2023-11-12 19:14:52 +01:00
Erik Montnemery
859c5c48c4
Fix yaml loader tests to test both C and Python implementations ( #103606 )
2023-11-07 23:49:31 +01:00
Erik Montnemery
c29b0cd05b
Correct line numbers in yaml node annotations ( #103605 )
2023-11-07 23:22:23 +01:00
Erik Montnemery
05deae09fc
Add file and line annotation to strings when loading yaml ( #103586 )
2023-11-07 17:10:15 +01:00
Jan Bouwhuis
b86f3be510
Optmize timing excecutor timeout test ( #103276 )
2023-11-02 20:00:34 -05:00
Erik Montnemery
dff18b4a16
Rename `gather_with_concurrency` to `gather_with_limited_concurrency` ( #102241 )
...
* Rename gather_with_concurrency to gather_with_limited_concurrency
* Update test
2023-10-19 15:08:52 +02:00
Franck Nijhof
664e490cfa
Update base image to 2023.10.0 ( #102126 )
2023-10-18 19:11:41 +02:00
Marc Mueller
02567d9bf6
Revert aiohttp to 3.8.5 for Python 3.11 ( #101932 )
2023-10-13 14:12:42 +02:00
Erik Montnemery
e6e190e7e2
Remove unused HideSensitiveDataFilter ( #101689 )
2023-10-09 12:02:52 +02:00
Marc Mueller
3155e62510
Update aiohttp to 3.9.0b0 ( #101627 )
2023-10-08 13:21:46 +02:00
Erik Montnemery
4e98d39106
Use loader.async_suggest_report_issue in async util ( #101516 )
2023-10-06 19:57:43 +02:00
Dave T
8626a4888c
Remove deprecated temperature conversion functions ( #101204 )
2023-10-04 06:04:23 +02:00
Dave T
efca5ba554
Remove deprecated pressure conversion functions ( #101347 )
...
Remove deprecated pressure conversion utils
2023-10-04 06:03:32 +02:00
Dave T
adf6d34d95
Remove deprecated speed conversion functions ( #101350 )
2023-10-04 06:01:45 +02:00
Dave T
8b7fae5200
Remove deprecated distance conversion functions ( #101199 )
2023-10-01 16:17:31 +02:00
Dave T
a4a99ce957
Remove deprecated volume conversion functions ( #101200 )
2023-10-01 16:06:14 +02:00
Joost Lekkerkerker
59207be5f8
Add body_exists to MockRequest in aiohttp util ( #100932 )
...
* Add body_exists to MockRequest in aiohttp util
* Add body_exists to MockRequest in aiohttp util
* Add body_exists to MockRequest in aiohttp util
2023-09-26 17:52:29 +02:00
Ville Skyttä
9da192c752
Avoid use of `datetime.utc*` methods deprecated in Python 3.12 ( #93684 )
...
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2023-08-24 16:38:22 +02:00
Ville Skyttä
6399d74c15
Remove unnnecessary pylint configs from core ( #98704 )
2023-08-22 23:12:12 +02:00