mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Add precipitation device class (#81145)
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user