Commit Graph

72 Commits

Author SHA1 Message Date
krahabb
afeaf2409f Add TEMPERATURE_DELTA device class to Number and Sensor entities (#147358) 2025-10-15 11:49:12 +02:00
Sid
3e20c506f4 Add gallons per hour as volume flow rate unit (#154246)
Co-authored-by: Christopher Fenner <9592452+CFenner@users.noreply.github.com>
2025-10-14 16:16:48 +02:00
Domochip
8464dad8e0 Add milliPascal (mPa) as unit of measurement for Pressure (#153087) 2025-10-14 12:38:14 +01:00
wittypluck
e4ea79866d Add support for μg/m³ for Carbon Monoxide (#153158) 2025-10-13 10:08:55 +02:00
epenet
b25622f40e Use SI constants in CO unit converter (#153187) 2025-10-10 14:59:20 +02:00
Erik Montnemery
ee67619cb1 Add mg/m³ as a valid UOM for sensor/number Carbon Monoxide device class (#154074)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
2025-10-10 11:31:31 +01:00
Dave T
1a0abe296c Remove deprecated conductivity constants (#153942) 2025-10-07 23:20:36 +01:00
Erik Montnemery
5975cd6e09 Revert "Add mg/m³ as a valid UOM for sensor/number Carbon Monoxide device class" (#153196) 2025-09-29 15:43:13 +01:00
Jan Bouwhuis
5eef6edded Add mg/m³ as a valid UOM for sensor/number Carbon Monoxide device class (#152456) 2025-09-17 22:04:23 +01:00
Alessandro Manighetti
eb4a873c43 Add m/min of speed sensors (#146441) 2025-09-16 18:02:22 +02:00
Bram Gerritsen
a3a4433d62 Add missing unit conversion for BTU/h (#152300) 2025-09-14 19:00:44 +02:00
ekobres
4c22264b13 Add support for inH₂O pressure unit (#148289)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2025-09-12 11:24:45 +02:00
Mike Kelly
1cca65b5c5 Add MCF (1000 Cubic Feet) as an alternate unit of measure for volume (#150015) 2025-09-04 09:29:37 +03:00
stephan-carstens
fc4b5f66ff Extend UnitOfApparentPower with 'kVA' (#151420) 2025-08-31 00:05:07 +01:00
Christian Fetzer
0dc2a5a02c Add m³/min as volume flow rate unit (#151051) 2025-08-24 20:30:25 +01:00
Ludovic BOUÉ
cc4b9e0eca Extend UnitOfReactivePower with 'mvar' (#150415) 2025-08-14 11:46:06 +02:00
Ludovic BOUÉ
eb4b75a9a7 Extend UnitOfApparentPower with 'mVA' (#150422)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-08-13 15:56:04 +02:00
Michael
50047f0a4e Add new device class for absolute humidity (#148567) 2025-07-14 11:46:17 +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
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
J. Nick Koston
e2c050ed40 Cache sensor precision calculation (#140019) 2025-03-07 16:14:22 -10: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
Lukas Schlötterer
7b63c17101 Add kV and MV unit conversion for voltages (#135396) 2025-01-13 13:00:35 +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
Stefan Agner
9ab69aa41c Add mWh as unit of measurement for Matter energy sensors (#133005) 2024-12-13 09:33:58 +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
Manu
397a299f15 Add µV as UnitOfElectricPotential (#130838) 2024-11-19 22:38:22 +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
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
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
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
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
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
Marc Mueller
19ab3d6daf Add empty line after module docstring [helpers + other] (#112707) 2024-03-08 10:36:11 -05:00
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
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
Dave T
a4a99ce957 Remove deprecated volume conversion functions (#101200) 2023-10-01 16:06:14 +02:00
J. Nick Koston
2f1f32f0bb Make unit converter use a factory to avoid looking up the ratios each conversion (#93706) 2023-05-29 20:50:40 +02:00
Erik Montnemery
9a70f47049 Teach UnitlessRatioConverter about ppm and ppb (#92989) 2023-05-12 16:46:37 +02: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
SgtBatten
0ccab19d2c Add Mega Joule as valid unit of energy (#86055)
* Add Mega joule

* Reorder valid energy types

Alphabetical

* Add Mega Joule

* Add Mega Joule as valid energy unit

* Add Mega Joule

* Add Mega Joule as a Unit of Measurement to Energy

* Update tests

* Update tests

* Update number docstring

Co-authored-by: Roving Ronin <108674933+Roving-Ronin@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-01-25 14:13:42 +01:00
epenet
64535175b1 Add missing conversion tests in unit conversion (#86434) 2023-01-23 10:11:11 +01:00
epenet
e1fc494b54 Add missing ratio test cases in unit conversion (#86340)
* Add missing ratio test cases in unit conversion

* Improve ratio test to check inverse
2023-01-22 16:39:45 +01:00