2 * Copyright (c) 2010-2022 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.avmfritz.internal.handler;
15 import static org.openhab.binding.avmfritz.internal.AVMFritzBindingConstants.*;
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.openhab.binding.avmfritz.internal.dto.AVMFritzBaseModel;
21 import org.openhab.binding.avmfritz.internal.dto.GroupModel;
22 import org.openhab.core.thing.Thing;
25 * Handler for a FRITZ! group. Handles commands, which are sent to one of the channels.
27 * @author Christoph Weitkamp - Initial contribution
30 public class GroupHandler extends AVMFritzBaseThingHandler {
32 public GroupHandler(Thing thing) {
37 protected void updateProperties(AVMFritzBaseModel device, Map<String, String> editProperties) {
38 if (device instanceof GroupModel) {
39 GroupModel groupModel = (GroupModel) device;
40 if (groupModel.getGroupinfo() != null) {
41 editProperties.put(PROPERTY_MASTER, groupModel.getGroupinfo().getMasterdeviceid());
42 editProperties.put(PROPERTY_MEMBERS, groupModel.getGroupinfo().getMembers());
45 super.updateProperties(device, editProperties);