Skip to content

Commit

Permalink
Use Units::MIRED instead of "mired" in HSBType (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimtng authored Nov 25, 2024
1 parent 03d5b76 commit 2cf93a7
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 2cf93a7

Please sign in to comment.