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.solaredge.internal.handler;
15 import java.util.List;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
19 import org.eclipse.jetty.client.HttpClient;
20 import org.openhab.core.thing.Channel;
21 import org.openhab.core.thing.ChannelGroupUID;
22 import org.openhab.core.thing.ChannelUID;
23 import org.openhab.core.thing.Thing;
24 import org.openhab.core.thing.ThingUID;
27 * generic thing handler for solaredge
29 * @author Alexander Friese - initial contribution
32 public class GenericSolarEdgeHandler extends SolarEdgeBaseHandler {
34 public GenericSolarEdgeHandler(Thing thing, HttpClient httpClient) {
35 super(thing, httpClient);
39 public List<Channel> getChannels() {
40 return getThing().getChannels();
44 public @Nullable Channel getChannel(String groupId, String channelId) {
45 ThingUID thingUID = this.getThing().getUID();
46 ChannelGroupUID channelGroupUID = new ChannelGroupUID(thingUID, groupId);
47 Channel channel = getThing().getChannel(new ChannelUID(channelGroupUID, channelId));