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.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.dto.Effect;
19 import org.openhab.binding.lifx.internal.dto.HevCycleState;
20 import org.openhab.binding.lifx.internal.dto.PowerState;
21 import org.openhab.binding.lifx.internal.dto.SignalStrength;
22 import org.openhab.binding.lifx.internal.fields.HSBK;
23 import org.openhab.core.library.types.PercentType;
26 * The {@link LifxLightStateListener} is notified when the properties of a {@link LifxLightState} change.
28 * @author Wouter Born - Initial contribution
31 public interface LifxLightStateListener {
34 * Called when the colors property changes.
36 * @param oldColors the old colors value
37 * @param newColors the new colors value
39 void handleColorsChange(HSBK[] oldColors, HSBK[] newColors);
42 * Called when the power state property changes.
44 * @param oldPowerState the old power state value
45 * @param newPowerState the new power state value
47 void handlePowerStateChange(@Nullable PowerState oldPowerState, PowerState newPowerState);
50 * Called when the HEV cycle state property changes.
52 * @param oldHevCycleState the old HEV cycle state value
53 * @param newHevCycleState the new HEV cycle state value
55 void handleHevCycleStateChange(@Nullable HevCycleState oldHevCycleState, HevCycleState newHevCycleState);
58 * Called when the infrared property changes.
60 * @param oldInfrared the old infrared value
61 * @param newInfrared the new infrared value
63 void handleInfraredChange(@Nullable PercentType oldInfrared, PercentType newInfrared);
66 * Called when the signal strength property changes.
68 * @param oldSignalStrength the old signal strength value
69 * @param newSignalStrength the new signal strength value
71 void handleSignalStrengthChange(@Nullable SignalStrength oldSignalStrength, SignalStrength newSignalStrength);
74 * Called when the tile effect changes.
76 * @param oldEffect the old tile effect value
77 * @param newEffect new tile effectvalue
79 void handleTileEffectChange(@Nullable Effect oldEffect, Effect newEffect);