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.miio.internal.robot;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
19 * derived from vacuum_cleaner-EN.pdf
21 * @author Marcel Verpaalen - Initial contribution
24 public enum VacuumErrorType {
26 ERROR00(0, "No error"),
27 ERROR01(1, "Laser sensor fault"),
28 ERROR02(2, "Collision sensor fault"),
29 ERROR03(3, "Wheel floating"),
30 ERROR04(4, "Cliff sensor fault"),
31 ERROR05(5, "Main brush blocked"),
32 ERROR06(6, "Side brush blocked"),
33 ERROR07(7, "Wheel blocked"),
34 ERROR08(8, "Device stuck"),
35 ERROR09(9, "Dust bin missing"),
36 ERROR10(10, "Filter blocked"),
37 ERROR11(11, "Magnetic field detected"),
38 ERROR12(12, "Low battery"),
39 ERROR13(13, "Charging problem"),
40 ERROR14(14, "Battery failure"),
41 ERROR15(15, "Wall sensor fault"),
42 ERROR16(16, "Uneven surface"),
43 ERROR17(17, "Side brush failure"),
44 ERROR18(18, "Suction fan failure"),
45 ERROR19(19, "Unpowered charging station"),
46 ERROR20(20, "Unknown Error"),
47 ERROR21(21, "Laser pressure sensor problem"),
48 ERROR22(22, "Charge sensor problem"),
49 ERROR23(23, "Dock problem"),
50 ERROR24(24, "No-go zone or invisible wall detected"),
51 ERROR254(254, "Bin full"),
52 ERROR255(255, "Internal error"),
53 UNKNOWN(-1, "Unknown Error");
56 private final String description;
58 VacuumErrorType(int id, String description) {
60 this.description = description;
67 public static VacuumErrorType getType(int value) {
68 for (VacuumErrorType st : VacuumErrorType.values()) {
69 if (st.getId() == value) {
76 public String getDescription() {
81 public String toString() {
82 return "Error " + Integer.toString(id) + ": " + description;