2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.hue.internal.handler;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.binding.hue.internal.api.dto.clip1.FullLight;
19 * The {@link LightStatusListener} is notified when a light status has changed or a light has been removed or added.
21 * @author Oliver Libutzki - Initial contribution
22 * @author Denis Dudnik - switched to internally integrated source of Jue library, minor code cleanup
25 public interface LightStatusListener {
28 * This method returns the light id of the listener
35 * This method is called whenever the state of the given light has changed. The new state can be obtained by
36 * {@link FullLight#getState()}.
38 * @param light The light which received the state update.
41 boolean onLightStateChanged(FullLight light);
44 * This method is called whenever a light is removed.
46 void onLightRemoved();
49 * This method is called whenever a light is reported as gone.
54 * This method is called whenever a light is added.
56 * @param light The light which is added.
58 void onLightAdded(FullLight light);
61 * The thing will block state updates for set time.
65 void setPollBypass(long bypassTime);
68 * Unblock state updates.
70 void unsetPollBypass();