mirror of
https://github.com/home-assistant/core.git
synced 2025-08-07 06:35:10 +02:00
Adjust liter unit and add gallons per minute
This commit is contained in:
@@ -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(
|
||||
|
@@ -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,
|
||||
}
|
||||
|
@@ -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,
|
||||
),
|
||||
],
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user