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.boschshc.internal.services.communicationquality.dto;
15 import org.openhab.core.library.types.DecimalType;
18 * Possible states for the communication quality between a device and the
21 * @author David Pace - Initial contribution
24 public enum CommunicationQualityState {
33 * Converts this Bosch-specific communication quality state into a numeric state
34 * for the system channel of type <code>signal-strength</code>.
38 public DecimalType toSystemSignalStrength() {
41 return new DecimalType(1);
43 return new DecimalType(2);
45 return new DecimalType(3);
47 return new DecimalType(4);
49 // includes UNKNOWN and FETCHING
50 return new DecimalType(0);