]> git.basschouten.com Git - openhab-addons.git/blob
fab9ce6c49fcdd8702ed046a29bfeaf000062044
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.hue.internal.handler;
14
15 import java.util.Collection;
16 import java.util.Set;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.openhab.binding.hue.internal.action.LightActions;
20 import org.openhab.core.thing.binding.ThingHandler;
21 import org.openhab.core.thing.binding.ThingHandlerService;
22 import org.openhab.core.types.Command;
23
24 /**
25  * The {@link HueLightActionsHandler} defines interface handlers to handle {@link LightActions}.
26  *
27  * @author Christoph Weitkamp - Initial contribution
28  */
29 @NonNullByDefault
30 public interface HueLightActionsHandler extends ThingHandler {
31
32     @Override
33     default Collection<Class<? extends ThingHandlerService>> getServices() {
34         return Set.of(LightActions.class);
35     }
36
37     /**
38      * Handles a command for a given channel.
39      *
40      * @param channel the id of the channel to which the command was sent
41      * @param command the {@link Command}
42      * @param fadeTime duration for execution of the command
43      */
44     void handleCommand(String channel, Command command, long fadeTime);
45 }