[miio] extend units for miot types (#9318)

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
Marcel 2020-12-11 10:20:41 -08:00 committed by GitHub
parent c755e85281
commit e9e8207345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -36,13 +36,23 @@ public enum MiIoQuantiyTypes {
CELCIUS(SIUnits.CELSIUS, "C"),
FAHRENHEIT(ImperialUnits.FAHRENHEIT),
KELVIN(Units.KELVIN, "K"),
PASCAL(SIUnits.PASCAL),
SECOND(Units.SECOND, "seconds"),
MINUTE(Units.MINUTE, "minutes"),
HOUR(Units.HOUR, "hours"),
DAY(Units.DAY, "days"),
AMPERE(Units.AMPERE),
VOLT(Units.VOLT),
WATT(Units.WATT),
LITRE(Units.LITRE, "liter"),
LUX(Units.LUX),
RADIANS(Units.RADIAN, "radians"),
SQUARE_METRE(SIUnits.SQUARE_METRE, "square_meter", "squaremeter"),
PERCENT(Units.PERCENT);
PERCENT(Units.PERCENT),
KGM3(Units.KILOGRAM_PER_CUBICMETRE, "kilogram_per_cubicmeter"),
UGM3(Units.MICROGRAM_PER_CUBICMETRE, "microgram_per_cubicmeter"),
PPM(Units.PARTS_PER_MILLION, "parts_per_million");
private final Unit<?> unit;
private final String[] aliasses;