2 * Copyright (c) 2010-2020 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.lifx.internal.listener;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.binding.lifx.internal.LifxLightState;
18 import org.openhab.binding.lifx.internal.fields.HSBK;
19 import org.openhab.binding.lifx.internal.protocol.Effect;
20 import org.openhab.binding.lifx.internal.protocol.PowerState;
21 import org.openhab.binding.lifx.internal.protocol.SignalStrength;
22 import org.openhab.core.library.types.PercentType;
25 * The {@link LifxLightStateListener} is notified when the properties of a {@link LifxLightState} change.
27 * @author Wouter Born - Initial contribution
30 public interface LifxLightStateListener {
33 * Called when the colors property changes.
35 * @param oldColors the old colors value
36 * @param newColors the new colors value
38 void handleColorsChange(HSBK[] oldColors, HSBK[] newColors);
41 * Called when the power state property changes.
43 * @param oldPowerState the old power state value
44 * @param newPowerState the new power state value
46 void handlePowerStateChange(@Nullable PowerState oldPowerState, PowerState newPowerState);
49 * Called when the infrared property changes.
51 * @param oldInfrared the old infrared value
52 * @param newInfrared the new infrared value
54 void handleInfraredChange(@Nullable PercentType oldInfrared, PercentType newInfrared);
57 * Called when the signal strength property changes.
59 * @param oldSignalStrength the old signal strength value
60 * @param newSignalStrength the new signal strength value
62 void handleSignalStrengthChange(@Nullable SignalStrength oldSignalStrength, SignalStrength newSignalStrength);
65 * Called when the tile effect changes.
67 * @param oldEffect the old tile effect value
68 * @param newEffect new tile effectvalue
70 void handleTileEffectChange(@Nullable Effect oldEffect, Effect newEffect);