Adjust liter unit and add gallons per minute

This commit is contained in:
Joakim Plate
2023-06-04 10:39:28 +02:00
parent 73b34b6078
commit badd06ede0
3 changed files with 23 additions and 1 deletions

View File

@@ -1041,7 +1041,8 @@ class UnitOfVolumeFlowRate(StrEnum):
CUBIC_METERS_PER_HOUR = "m³/h"
CUBIC_FEET_PER_MINUTE = "ft³/m"
LITERS_PER_MINUTE = "l/m"
LITERS_PER_MINUTE = "L/min"
GALLONS_PER_MINUTE = "gal/min"
_DEPRECATED_VOLUME_FLOW_RATE_CUBIC_METERS_PER_HOUR: Final = DeprecatedConstantEnum(

View File

@@ -532,9 +532,12 @@ class VolumeFlowRateConverter(BaseUnitConverter):
/ (_HRS_TO_MINUTES * _CUBIC_FOOT_TO_CUBIC_METER),
UnitOfVolumeFlowRate.LITERS_PER_MINUTE: 1
/ (_HRS_TO_MINUTES * _L_TO_CUBIC_METER),
UnitOfVolumeFlowRate.GALLONS_PER_MINUTE: 1
/ (_HRS_TO_MINUTES * _GALLON_TO_CUBIC_METER),
}
VALID_UNITS = {
UnitOfVolumeFlowRate.CUBIC_FEET_PER_MINUTE,
UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR,
UnitOfVolumeFlowRate.LITERS_PER_MINUTE,
UnitOfVolumeFlowRate.GALLONS_PER_MINUTE,
}

View File

@@ -434,6 +434,12 @@ _CONVERTED_VALUE: dict[
0.58857777,
UnitOfVolumeFlowRate.CUBIC_FEET_PER_MINUTE,
),
(
1,
UnitOfVolumeFlowRate.CUBIC_METERS_PER_HOUR,
4.40286754,
UnitOfVolumeFlowRate.GALLONS_PER_MINUTE,
),
(
1,
UnitOfVolumeFlowRate.LITERS_PER_MINUTE,
@@ -446,6 +452,12 @@ _CONVERTED_VALUE: dict[
0.03531466,
UnitOfVolumeFlowRate.CUBIC_FEET_PER_MINUTE,
),
(
1,
UnitOfVolumeFlowRate.LITERS_PER_MINUTE,
0.264172052,
UnitOfVolumeFlowRate.GALLONS_PER_MINUTE,
),
(
1,
UnitOfVolumeFlowRate.CUBIC_FEET_PER_MINUTE,
@@ -458,6 +470,12 @@ _CONVERTED_VALUE: dict[
28.3168465,
UnitOfVolumeFlowRate.LITERS_PER_MINUTE,
),
(
1,
UnitOfVolumeFlowRate.CUBIC_FEET_PER_MINUTE,
7.48051948,
UnitOfVolumeFlowRate.GALLONS_PER_MINUTE,
),
],
}