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.miio.internal.robot;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * List of dockingstation status
20 * @author David Kumar - Initial contribution
23 public enum DockStatusType {
24 UNKNOWN(-1, "Unknown"),
26 ERROR_SUCTION(34, "Suction Error"),
27 ERROR_FRESH_WATER_TANK(38, "Error fresh water tank"),
28 ERROR_FRESH_DIRTY_WATER_TANK(39, "Error dirty water tank"),
29 ERROR_DUST_CONTAINER(46, "Missing dust container/dust bag");
32 private final String description;
34 DockStatusType(int id, String description) {
36 this.description = description;
43 public static DockStatusType getType(int value) {
46 DockStatusType[] arrayOfDockStatusType;
47 for (i = (arrayOfDockStatusType = values()).length, b = 0; b < i;) {
48 DockStatusType st = arrayOfDockStatusType[b];
49 if (st.getId() == value) {
58 public String getDescription() {
59 return this.description;
63 public String toString() {
64 return "Status " + Integer.toString(this.id) + ": " + this.description;