diff --git a/lib/openhab/core/types/hsb_type.rb b/lib/openhab/core/types/hsb_type.rb index 04e9ab2e0..79098db66 100644 --- a/lib/openhab/core/types/hsb_type.rb +++ b/lib/openhab/core/types/hsb_type.rb @@ -255,8 +255,8 @@ def planckian_cct(range: nil, **kwargs) range_type = range.begin || range.end if !range_type.is_a?(QuantityType) range = Range.new(range.begin | "K", range.end | "K") - elsif range_type.unit.to_s == "mired" - cct |= "mired" + elsif range_type.unit == Units::MIRED + cct |= Units::MIRED end end return nil if range && !range.cover?(cct)