2 * Copyright (c) 2010-2021 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;
16 import org.openhab.core.thing.type.ChannelTypeUID;
19 * List of additional capabilities
21 * @author Marcel Verpaalen - Initial contribution
24 public enum RobotCababilities {
26 WATERBOX_STATUS("water_box_status", "status#water_box_status", "miio:water_box_status"),
27 LOCKSTATUS("lock_status", "status#lock_status", "miio:lock_status"),
28 WATERBOX_MODE("water_box_mode", "status#water_box_mode", "miio:water_box_mode"),
29 WATERBOX_CARRIAGE("water_box_carriage_status", "status#water_box_carriage_status",
30 "miio:water_box_carriage_status"),
31 MOP_FORBIDDEN("mop_forbidden_enable", "status#mop_forbidden_enable", "miio:mop_forbidden_enable"),
32 LOCATING("is_locating", "status#is_locating", "miio:is_locating"),
33 SEGMENT_CLEAN("", "actions#segment", "miio:segment");
35 private final String statusFieldName;
36 private final String channel;
37 private final String channelType;
39 RobotCababilities(String statusKey, String channel, String channelType) {
40 this.statusFieldName = statusKey;
41 this.channel = channel;
42 this.channelType = channelType;
45 public String getStatusFieldName() {
46 return statusFieldName;
49 public String getChannel() {
53 public ChannelTypeUID getChannelType() {
54 return new ChannelTypeUID(channelType);
58 public String toString() {
59 return String.format("Capability %s: status field name: '%s', channel: '%s', channeltype: '%s'.", this.name(),
60 statusFieldName, channel, channelType);