]> git.basschouten.com Git - openhab-addons.git/blob
bdd44133a0d84ff55ee6ed416ea096bda9f9b413
[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.solaredge.internal.handler;
14
15 import java.util.Map;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.solaredge.internal.config.SolarEdgeConfiguration;
19 import org.openhab.binding.solaredge.internal.connector.WebInterface;
20 import org.openhab.core.thing.Channel;
21 import org.openhab.core.thing.ThingStatus;
22 import org.openhab.core.thing.ThingStatusDetail;
23 import org.openhab.core.thing.binding.ThingHandler;
24 import org.openhab.core.types.State;
25
26 /**
27  * public interface of the {@link SolarEdgeHandler}
28  *
29  * @author Alexander Friese - initial contribution
30  */
31 @NonNullByDefault
32 public interface SolarEdgeHandler extends ThingHandler, ChannelProvider {
33     /**
34      * Called from {@link WebInterface#authenticate()} to update
35      * the thing status because updateStatus is protected.
36      *
37      * @param status Bridge status
38      * @param statusDetail Bridge status detail
39      * @param description Bridge status description
40      */
41     void setStatusInfo(ThingStatus status, ThingStatusDetail statusDetail, String description);
42
43     /**
44      * Provides the web interface object.
45      *
46      * @return The web interface object
47      */
48     WebInterface getWebInterface();
49
50     /**
51      * method which updates the channels.
52      *
53      * @param values key-value list where key is the channel
54      */
55     void updateChannelStatus(Map<Channel, State> values);
56
57     /**
58      * return the binding's configuration
59      *
60      * @return
61      */
62     SolarEdgeConfiguration getConfiguration();
63 }