2 * Copyright (c) 2010-2024 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.freeathomesystem.internal.util;
15 import static org.openhab.binding.freeathomesystem.internal.FreeAtHomeSystemBindingConstants.*;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.core.thing.ThingTypeUID;
19 import org.openhab.core.thing.type.ChannelTypeUID;
23 * @author Andras Uhrin - Initial contribution
27 public class UidUtils {
29 public static ChannelTypeUID generateChannelTypeUID(String valueType, boolean isReadOnly) {
30 String channelNameString;
33 channelNameString = valueType + "-ro";
35 channelNameString = valueType;
38 return new ChannelTypeUID(BINDING_ID, channelNameString);
41 public static ThingTypeUID generateThingUID() {
42 return new ThingTypeUID(BINDING_ID, DEVICE_TYPE_ID);