]> git.basschouten.com Git - openhab-addons.git/blob
f0d346196d25f95021e0f3894edf006071eff10e
[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.digitalstrom.internal.lib.listener;
14
15 import org.openhab.binding.digitalstrom.internal.lib.climate.TemperatureControlSensorTransmitter;
16 import org.openhab.binding.digitalstrom.internal.lib.climate.jsonresponsecontainer.impl.TemperatureControlStatus;
17
18 /**
19  * The {@link TemperatureControlStatusListener} can be implemented to get informed by configuration and status changes.
20  * <br>
21  * It also can be implemented as discovery, than the id have to be {@link #DISCOVERY}.
22  *
23  * @author Michael Ochel
24  * @author Matthias Siegele
25  *
26  */
27 public interface TemperatureControlStatusListener {
28
29     /**
30      * The id for discovery.
31      */
32     static Integer DISCOVERY = -2;
33
34     /**
35      * Will be called, if the configuration of the {@link TemperatureControlStatus} has changed.
36      *
37      * @param tempControlStatus that has changed
38      */
39     void configChanged(TemperatureControlStatus tempControlStatus);
40
41     /**
42      * Will be called, if the target temperature has changed.
43      *
44      * @param newValue of the target temperature
45      */
46     void onTargetTemperatureChanged(Float newValue);
47
48     /**
49      * Will be called, if the control value has changed.
50      *
51      * @param newValue of the control value
52      */
53     void onControlValueChanged(Integer newValue);
54
55     /**
56      * Registers a {@link TemperatureControlSensorTransmitter}.
57      *
58      * @param temperatureSensorTransmitter to register
59      */
60     void registerTemperatureSensorTransmitter(TemperatureControlSensorTransmitter temperatureSensorTransmitter);
61
62     /**
63      * Returns the id of this {@link TemperatureControlStatusListener}.
64      *
65      * @return id
66      */
67     Integer getTemperationControlStatusListenrID();
68 }