Skip to content

Commit

Permalink
use Units::MIRED instead of "mired"
Browse files Browse the repository at this point in the history
The change was introduced in openhab/openhab-core#4433

Signed-off-by: Jimmy Tanagra <[email protected]>
  • Loading branch information
jimtng committed Nov 25, 2024
1 parent 03d5b76 commit 100e777
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/openhab/core/types/hsb_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 100e777

Please sign in to comment.