Search in sources :

Example 1 with HueLightHandler

use of org.eclipse.smarthome.binding.hue.handler.HueLightHandler in project smarthome by eclipse.

the class HueThingHandlerFactory method createHandler.

@Override
@Nullable
protected ThingHandler createHandler(Thing thing) {
    if (HueBridgeHandler.SUPPORTED_THING_TYPES.contains(thing.getThingTypeUID())) {
        HueBridgeHandler handler = new HueBridgeHandler((Bridge) thing);
        registerLightDiscoveryService(handler);
        return handler;
    } else if (HueLightHandler.SUPPORTED_THING_TYPES.contains(thing.getThingTypeUID())) {
        return new HueLightHandler(thing);
    } else {
        return null;
    }
}
Also used : HueLightHandler(org.eclipse.smarthome.binding.hue.handler.HueLightHandler) HueBridgeHandler(org.eclipse.smarthome.binding.hue.handler.HueBridgeHandler) Nullable(org.eclipse.jdt.annotation.Nullable)

Aggregations

Nullable (org.eclipse.jdt.annotation.Nullable)1 HueBridgeHandler (org.eclipse.smarthome.binding.hue.handler.HueBridgeHandler)1 HueLightHandler (org.eclipse.smarthome.binding.hue.handler.HueLightHandler)1