use of org.eclipse.smarthome.binding.dmx.handler.TunableWhiteThingHandler in project smarthome by eclipse.
the class TunableWhiteThingHandlerTest method testThingStatus_noBridge.
@Test
public void testThingStatus_noBridge() {
// check that thing is offline if no bridge found
TunableWhiteThingHandler dimmerHandlerWithoutBridge = new TunableWhiteThingHandler(dimmerThing) {
@Override
@Nullable
protected Bridge getBridge() {
return null;
}
};
assertThingStatusWithoutBridge(dimmerHandlerWithoutBridge);
}
use of org.eclipse.smarthome.binding.dmx.handler.TunableWhiteThingHandler in project smarthome by eclipse.
the class TunableWhiteThingHandlerTest method setUp.
@Before
public void setUp() {
super.setup();
thingProperties = new HashMap<>();
thingProperties.put(CONFIG_DMX_ID, TEST_CHANNEL_CONFIG);
thingProperties.put(CONFIG_DIMMER_FADE_TIME, TEST_FADE_TIME);
thingProperties.put(CONFIG_DIMMER_TURNONVALUE, "127,127");
dimmerThing = ThingBuilder.create(THING_TYPE_TUNABLEWHITE, "testdimmer").withLabel("Dimmer Thing").withBridge(bridge.getUID()).withConfiguration(new Configuration(thingProperties)).withChannel(ChannelBuilder.create(CHANNEL_UID_BRIGHTNESS, "Brightness").withType(BRIGHTNESS_CHANNEL_TYPEUID).build()).withChannel(ChannelBuilder.create(CHANNEL_UID_BRIGHTNESS_CW, "Brightness CW").withType(BRIGHTNESS_CHANNEL_TYPEUID).build()).withChannel(ChannelBuilder.create(CHANNEL_UID_BRIGHTNESS_WW, "Brightness WW").withType(BRIGHTNESS_CHANNEL_TYPEUID).build()).withChannel(ChannelBuilder.create(CHANNEL_UID_COLOR_TEMP, "Color temperature").withType(COLOR_TEMPERATURE_CHANNEL_TYPEUID).build()).build();
dimmerThingHandler = new TunableWhiteThingHandler(dimmerThing) {
@Override
@Nullable
protected Bridge getBridge() {
return bridge;
}
};
initializeHandler(dimmerThingHandler);
}
Aggregations