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 available states
20 * @author Marcel Verpaalen - Initial contribution
23 public enum StatusType {
25 UNKNOWN(0, "Unknown"),
26 INITIATING(1, "Initiating"),
27 SLEEPING(2, "Sleeping"),
29 REMOTE(4, "Remote Control"),
30 CLEANING(5, "Cleaning"),
31 RETURNING(6, "Returning Dock"),
32 MANUAL(7, "Manual Mode"),
33 CHARGING(8, "Charging"),
34 CHARGING_ERROR(9, "Charging Error"),
36 SPOTCLEAN(11, "Spot cleaning"),
37 ERROR(12, "In Error"),
38 SHUTTING_DOWN(13, "Shutting Down"),
39 UPDATING(14, "Updating"),
40 DOCKING(15, "Docking"),
42 ZONE(17, "Zone Clean"),
43 ROOM(18, "Room Clean"),
44 RETURNING_HOME(22, "Returning Home"),
46 OFFLINE(101, "Device Offline");
49 private final String description;
51 StatusType(int id, String description) {
53 this.description = description;
60 public static StatusType getType(int value) {
61 for (StatusType st : StatusType.values()) {
62 if (st.getId() == value) {
69 public String getDescription() {
74 public String toString() {
75 return "Status " + Integer.toString(id) + ": " + description;