Adapt to ColorUtil changes in core (#14724)

* [deconz][dmx][mqtt.generic][mqtt.homeassistant][tado][tradfri][webthing] Adapt to core change (ColorUtil)

openhab/openhab-core#3479

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
Holger Friedrich
2023-04-08 11:42:18 +02:00
committed by GitHub
parent 64723db7aa
commit 3cd9c6c86c
10 changed files with 21 additions and 22 deletions

View File

@@ -210,7 +210,7 @@ public class ColorThingHandlerTest extends AbstractDmxThingTestParent {
assertChannelStateUpdate(CHANNEL_UID_COLOR,
state -> assertThat(((HSBType) state).getBrightness().doubleValue(), is(closeTo(30.0, 1))));
assertChannelStateUpdate(CHANNEL_UID_BRIGHTNESS_R,
state -> assertThat(((PercentType) state).doubleValue(), is(closeTo(19.2, 0.5))));
state -> assertThat(((PercentType) state).doubleValue(), is(closeTo(20.0, 0.5))));
assertChannelStateUpdate(CHANNEL_UID_BRIGHTNESS_G, state -> assertEquals(PercentType.ZERO, state));
assertChannelStateUpdate(CHANNEL_UID_BRIGHTNESS_B,
state -> assertThat(((PercentType) state).doubleValue(), is(closeTo(29.8, 0.5))));