Sure, sure. Link to the previous post.
The profile:
profile(:mired_to_kelvin) do |event, callback:, state:, command:|
next if command.nil?
case event
when :command_from_item
callback.handle_command((command | "mired" | "K").to_i)
when :state_from_handler then callback.send_update((state | "K" | "mired").to_i)
else next true
end
false
end
Why the profile? Apple Homekit sends and receives values in Mired. openHAB expects Kelvin though. I wanted to avoid a proxy item per color temperature and the profile does its job conveniently in OH 4.2.