Commit Graph

516 Commits

Author SHA1 Message Date
Marc Mueller
80eb4fb2f6 Replace asyncio.iscoroutinefunction (#148738) 2025-07-14 20:24:32 +01:00
Michael
50047f0a4e Add new device class for absolute humidity (#148567) 2025-07-14 11:46:17 +02:00
epenet
76be2fdba1 Improve (and align) deprecation messages (#147948) 2025-07-05 00:02:36 +02:00
epenet
e642cd45ae Enforce async_load_fixture in async test functions (#145709) 2025-06-30 11:56:26 +02:00
Erik Montnemery
5bc2e271d2 Re-raise annotated_yaml.YAMLException as HomeAssistantError (#147129)
* Re-raise annotated_yaml.YAMLException as HomeAssistantError

* Fix comment
2025-06-19 12:52:01 +02:00
Artur Pragacz
b36b591ccf Improve error message for global timeout (#141563)
* Improve error message for global timeout

* Add test

* Message works with zone too
2025-05-27 07:49:18 +02:00
Franck Nijhof
bca4793c69 Add concentration conversion support for mg/m³ (#145325) 2025-05-23 14:24:18 +01:00
Franck Nijhof
fb0cb7cad6 Add Wh/km unit for energy distance (#145243) 2025-05-20 12:16:27 +01:00
alorente
1d47dc41c9 Add reactive energy device class and units (#143941) 2025-05-15 12:05:46 +01:00
Arnie97
babc183834 Allow liter for gas sensor device class (#141518) 2025-05-06 10:59:09 +02:00
Brian Choromanski
f7c1a0c5e6 Add tests for parse_time_expression (#143912) 2025-04-30 13:58:17 +01:00
Michael
3405b2549b Add new units L/h , L/s and m³/s to volume flow rate sensor device class (#143625)
add new units L/h , L/s and m³/s
2025-04-25 00:17:47 +02:00
Mathijs van de Nes
458162c3f5 Fix typo in util.ssl test (#142799) 2025-04-14 12:31:44 +02:00
Mathijs van de Nes
b20f46e8b9 Add non-shared ssl client_context (#142653) 2025-04-11 10:55:05 -10:00
Abílio Costa
f8113ae80b Allow excluding modules from noisy logs check (#142020)
* Allow excluding modules from noisy logs check

* Cache non-excluded modules; hardcode self module name; optimize call

* Address review comments
2025-04-02 15:07:00 +02:00
Abílio Costa
d12b4a1460 Log a warning for modules that log too often (#139708)
* Log a warning for modules that log too often

* Improve var naming

* Increase time window; improve log info

* Fix zha type

* Fix typo

* Ignore debug logs

* Use timer to avoid now() calls

* Switch to async_track_time_interval

* Allow using base QueueLister

* Add test for counters reset

* Make var names consistent; reduce message/time ratio

* Use log times instead of timer

* Simplify reset test

* Warn only once per module

* Remove uneeded counter reset
2025-03-20 14:53:53 -10:00
Jan-Philipp Benecke
7b9ea63f17 Split out yaml loading into own package (#140683)
* Split out yaml loading into library

* Code review

* Code review

* Fix check config script
2025-03-15 22:26:18 -04:00
J. Nick Koston
e2c050ed40 Cache sensor precision calculation (#140019) 2025-03-07 16:14:22 -10:00
epenet
09cea6ce96 Cleanup runtime warnings in async unit tests (#137308) 2025-02-04 11:44:17 +01:00
Jakob Schlyter
84ae476b67 Energy distance units (#136933)
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
2025-01-31 14:22:25 +00:00
epenet
b11b36b523 Add more util aliases to import conventions (#136153) 2025-01-21 15:58:23 +01:00
epenet
364556a7dd Prefer from...import...as over import...as in core tests (#136146) 2025-01-21 09:28:17 +01:00
Lukas Schlötterer
7b63c17101 Add kV and MV unit conversion for voltages (#135396) 2025-01-13 13:00:35 +01:00
Craig Andrews
9e8df72c0d Improve is docker env checks (#132404)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Sander Hoentjen <sander@hoentjen.eu>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Robert Resch <robert@resch.dev>
2025-01-02 17:21:49 +01:00
Stefan Agner
962f1bad32 Add mW as unit of measurement for Matter electrical power sensors (#133504) 2024-12-19 11:40:05 +00:00
G Johansson
8cde404997 Raise issue for deprecated imperial unit system (#130979) 2024-12-13 10:05:46 +01:00
Stefan Agner
9ab69aa41c Add mWh as unit of measurement for Matter energy sensors (#133005) 2024-12-13 09:33:58 +01:00
Erik Montnemery
bbce183faf Deprecate dt_util.utc_to_timestamp (#131787) 2024-11-28 17:00:20 +01:00
Josef Zweck
3cfd958dc2 Allow mL/s as UnitOfVolumeFlowRate (#130771) 2024-11-21 20:47:24 +01:00
Michael Arthur
d8549409f7 Area units and conversion between metric and US (#123563)
* area conversions

* start work on tests

* add number device class

* update unit conversions to utilise distance constants

* add area unit

* update test unit system

* update device condition and trigger

* update statistic unit converters

* further tests work WIP

* update test unit system

* add missing string translations

* fix websocket tests

* add deprecated notice

* add more missing strings and missing initialisation of unit system

* adjust icon and remove strings from scrape and random

* Fix acre to meters conversion

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Tidy up valid units

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* fix ordering of area

* update order alphabetically

* fix broken test

* update test_init

* Update homeassistant/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* remove deprecated unit and fix alphabetical order

* change deprecation and add tests, change to millimeter conversion for inches

* fix order

* re-order defs alphabetically

* add measurement as well

* update icons

* fix up Deprecation of area square meters

* Update core integrations to UnitOfArea

* update test recorder tests

* unit system tests in alphabetical

* update snapshot

* rebuild

* revert alphabetization of functions

* other revert of alphabetical order

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-11-21 16:10:44 +01:00
epenet
deeb55ac50 Add ability to set HA breaking version in report_usage (#130858)
* Add ability to set breaking version in report_usage

* Adjust tests

* Adjust test

* Adjust tests

* Rename breaks_in_version => breaks_in_ha_version
2024-11-20 21:41:57 +01:00
Manu
397a299f15 Add µV as UnitOfElectricPotential (#130838) 2024-11-19 22:38:22 +01:00
Petar Petrov
c68cadad7a Improve precision of HSV color conversion (#130880) 2024-11-19 22:06:57 +01:00
mrspouse
5c52e865a0 Correct spelling of BloodGlucoseConcentrationConverter (#130449)
* Correct spelling of BloodGlucoseConcentrationConverter

* Correct spelling of BloodGlucoseConcentrationConverter
2024-11-12 21:48:42 +01:00
epenet
313309a7e0 Remove deprecated YAML loaders (#130364) 2024-11-11 20:24:51 +01:00
epenet
25fb70f281 Add blood glucose concentration device class (#129340) 2024-11-09 11:29:24 +01:00
Jakob Schlyter
cd11f01ace Add support for MW/GW/TW and GWh/TWh (#130089) 2024-11-08 22:12:16 +01:00
J. Nick Koston
c460e1bbbe Fix cancellation leaking upward from the timeout util (#129003) 2024-10-23 12:00:01 -10:00
Jan Morawiec
35ff3afa12 Refactor unittest tests to use pytest (#127770)
* Refactor unittest tests to use pytest

* Add type annotations

* Use caplog to assert logs

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-10-17 21:28:14 +02:00
Steven B.
59e5eb9a1c Always use uv from virtual environment at runtime (#128371) 2024-10-16 19:42:25 +02:00
Erik Montnemery
0956dbb578 Rename UnitOfConductivity enum members (#127919)
* Rename UnitOfConductivity enum members

* Update test snapshots
2024-10-08 14:44:01 +02:00
Michael
ffa6b5fcb2 Use two words for Nautical miles unit (#126905) 2024-09-27 13:16:13 +02:00
Michael
26b5dab12b Add nmi (nautical miles) as valid distance unit (#124723) 2024-09-27 10:40:59 +02:00
starkillerOG
69ecdda5f5 Add SSL Cipher option to aiohttp async_get_clientsession (#126317)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-24 21:31:52 +02:00
Trevor Schirmer
96b7fc9a75 Add mm/s and in/s As Unit Of Speed (#125044)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-22 09:01:46 -05:00
Alberto Montes
5d2f8319b1 Update string formatting to use f-string on tests (#125986)
* Update string formatting to use f-string on tests

* Update test_package.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update statement given feedback

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-09-19 10:32:38 +02:00
Robert Resch
d9812f0d48 Fix uv installing in user site packages (#125808) 2024-09-15 14:53:45 +02:00
Robert Resch
7555f209b6 Use uv at runtime too (#125110) 2024-09-11 09:43:26 +02:00
Sergey Dudanov
dcd7830a35 Add calories to energy sensor device class (#122796)
* added calories to energy class

* changes

* temporarily solving the problem with conversion accuracy

* add tests

* added calories to energy class

* changes

* add tests

* Update homeassistant/util/unit_conversion.py

Co-authored-by: Robert Resch <robert@resch.dev>

* Update homeassistant/util/unit_conversion.py

Co-authored-by: Robert Resch <robert@resch.dev>

* apply suggestions

* Update homeassistant/util/unit_conversion.py

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-10 12:22:15 +02:00
Erik Montnemery
404a7bab18 Wrap OSError in loader.load_yaml (#124406) 2024-08-22 09:06:41 -05:00