From 100e7773dbde09d327dd96fe7909dbf08c32f0d8 Mon Sep 17 00:00:00 2001 From: Jimmy Tanagra Date: Mon, 25 Nov 2024 12:37:58 +1000 Subject: [PATCH] use Units::MIRED instead of "mired" The change was introduced in https://github.com/openhab/openhab-core/pull/4433 Signed-off-by: Jimmy Tanagra --- lib/openhab/core/types/hsb_type.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)