Commit Graph

494 Commits (c4d8cda92be330311fd83809588c7e0131d1c49b)

Author SHA1 Message Date
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
Erik Montnemery ab6d0e3277
Handle !include without arguments in configuration.yaml (#124399)
* Prevent !include without arguments in configuration.yaml from crashing core

* Add test
2024-08-22 12:08:24 +02:00
Erik Montnemery 6c01e4b99c
Use BaseEventLoop._thread_id instead of a custom attribute (#124054)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-08-17 10:59:39 +02:00
J. Nick Koston b15ea58851
Relocate code to get scheduled TimerHandles (#123546) 2024-08-12 09:15:33 +02:00
epenet ad26db7dc8
Replace pylint broad-exception-raised rule with ruff (#123021) 2024-08-02 12:24:03 +02:00
epenet d16a2fac80
Rename variable in async tests (#122996) 2024-08-01 09:20:21 +02:00
Erik Montnemery 9b497aebb4
Fix bug in timeout util related to multiple global freezes (#122466) 2024-07-29 10:12:18 +02:00
Marc Mueller 90e7d82049
Use correct enum in UnitSystem tests (#122256) 2024-07-20 17:33:48 +02:00
Marc Mueller a6068dcdf2
Update import locations in tests (#122216) 2024-07-20 11:16:04 +02:00
J. Nick Koston 7958c0825e
Fix blocking process call in process tests (#121104)
Discovered by ruff in https://github.com/home-assistant/core/pull/120799
2024-07-03 22:26:03 +02:00
J. Nick Koston 291f309c0e
Remove unnecessary lambdas in timeout tests (#121101) 2024-07-03 22:24:41 +02:00
epenet 1332e39f9e
Cleanup deprecated json utils (#121069)
* Cleanup deprectated json utils

* Adjust pylint
2024-07-03 15:57:32 +02:00
epenet faf43ed4c7
Adjust Generator type hints in tests (#121013) 2024-07-02 14:12:02 +02:00
J. Nick Koston 001ee0cc0b
Downgrade logging previously reported asyncio block to debug (#120942) 2024-07-01 18:26:20 +02:00
Marc Mueller ca55986057
Import Generator from collections.abc (1) (#120914) 2024-07-01 11:51:51 +02:00
Joost Lekkerkerker b56c4a757c
Bump ruff to 0.5.0 (#120749) 2024-06-28 15:23:21 +02:00
Joost Lekkerkerker 03c6e0c55f
Fix SIM300 (#120725) 2024-06-28 10:46:02 +02:00
J. Nick Koston f7e194b32c
Adjust blocking I/O messages to provide developer help (#120113) 2024-06-21 12:55:22 -05:00
dontinelli 0dd5391cd7
Add Siemes and Millisiemens as additional units of conductivity and enable conversion between conductivity units (#118728) 2024-06-21 11:10:15 +02:00
epenet 2a7e78a80f
Ignore broad-exception-raised pylint warnings in tests (#119468) 2024-06-12 12:21:41 +02:00
epenet 7388271689
Fix unspecified-encoding warnings in tests (#119405) 2024-06-11 17:58:40 +02:00
epenet 18722aeccb
Improve type hints and fix pylint warnings in util tests (#119355) 2024-06-11 15:07:40 +02:00
epenet 1974ea4fdd
Improve type hints in yaml util tests (#119358) 2024-06-11 15:01:54 +02:00