Add precipitation device class (#81145)

This commit is contained in:
epenet
2022-11-18 12:41:33 +01:00
committed by GitHub
parent fb909d694f
commit dd960c4e62
5 changed files with 25 additions and 0 deletions

View File

@ -256,6 +256,8 @@ METRIC_SYSTEM = UnitSystem(
("distance", UnitOfLength.YARDS): UnitOfLength.METERS,
# Convert non-metric volumes of gas meters
("gas", UnitOfVolume.CUBIC_FEET): UnitOfVolume.CUBIC_METERS,
# Convert non-metric precipitation
("precipitation", UnitOfLength.INCHES): UnitOfLength.MILLIMETERS,
# Convert non-metric speeds except knots to km/h
("speed", UnitOfSpeed.FEET_PER_SECOND): UnitOfSpeed.KILOMETERS_PER_HOUR,
("speed", UnitOfSpeed.MILES_PER_HOUR): UnitOfSpeed.KILOMETERS_PER_HOUR,
@ -286,6 +288,8 @@ US_CUSTOMARY_SYSTEM = UnitSystem(
("distance", UnitOfLength.MILLIMETERS): UnitOfLength.INCHES,
# Convert non-USCS volumes of gas meters
("gas", UnitOfVolume.CUBIC_METERS): UnitOfVolume.CUBIC_FEET,
# Convert non-USCS precipitation
("precipitation", UnitOfLength.MILLIMETERS): UnitOfLength.INCHES,
# Convert non-USCS speeds except knots to mph
("speed", UnitOfSpeed.METERS_PER_SECOND): UnitOfSpeed.MILES_PER_HOUR,
("speed", UnitOfSpeed.KILOMETERS_PER_HOUR): UnitOfSpeed.MILES_PER_HOUR,