File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
bundles/org.openhab.core/src
main/java/org/openhab/core/library/unit
test/java/org/openhab/core/library/unit Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -293,7 +293,9 @@ public final class Units extends CustomUnits {
293
293
SimpleUnitFormat .getInstance ().label (MILLIAMPERE_HOUR , "mAh" );
294
294
SimpleUnitFormat .getInstance ().label (MILLIBAR , "mbar" );
295
295
SimpleUnitFormat .getInstance ().label (MILLIMETRE_OF_MERCURY , MILLIMETRE_OF_MERCURY .getSymbol ());
296
- SimpleUnitFormat .getInstance ().label (MIRED , "mired" );
296
+ SimpleUnitFormat .getInstance ().label (MIRED , "MK⁻¹" );
297
+ SimpleUnitFormat .getInstance ().alias (MIRED , "mired" );
298
+ SimpleUnitFormat .getInstance ().alias (MIRED , "mirek" );
297
299
SimpleUnitFormat .getInstance ().label (PARTS_PER_BILLION , "ppb" );
298
300
SimpleUnitFormat .getInstance ().label (PARTS_PER_MILLION , "ppm" );
299
301
SimpleUnitFormat .getInstance ().label (PETABYTE , "PB" );
Original file line number Diff line number Diff line change @@ -431,6 +431,17 @@ public void testYearMonthDay() {
431
431
assertThat (converted2 .doubleValue (), is (closeTo (12.0 , DEFAULT_ERROR )));
432
432
}
433
433
434
+ @ Test
435
+ public void testColorTemperatureAliases () {
436
+ QuantityType <?> value ;
437
+ value = QuantityType .valueOf ("20 mired" );
438
+ assertEquals (Units .MIRED , value .getUnit ());
439
+ value = QuantityType .valueOf ("20 mirek" );
440
+ assertEquals (Units .MIRED , value .getUnit ());
441
+ value = QuantityType .valueOf ("20 MK⁻¹" );
442
+ assertEquals (Units .MIRED , value .getUnit ());
443
+ }
444
+
434
445
private static class QuantityEquals extends IsEqual <Quantity <?>> {
435
446
private Quantity <?> quantity ;
436
447
You can’t perform that action at this time.
0 commit comments