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.
This commit is contained in:
Joakim Plate 2024-01-30 15:01:08 +01:00 committed by GitHub
parent a8e3df7e50
commit cece117c93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 180 additions and 3 deletions

View file

@ -103,7 +103,13 @@ def test_all() -> None:
],
"VOLUME_",
)
+ _create_tuples(const.UnitOfVolumeFlowRate, "VOLUME_FLOW_RATE_")
+ _create_tuples(
[
const.UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR,
const.UnitOfVolumeFlowRate.CUBIC_FEET_PER_MINUTE,
],
"VOLUME_FLOW_RATE_",
)
+ _create_tuples(
[
const.UnitOfMass.GRAMS,