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.elerotransmitterstick.internal.stick;
16 * @author Volker Bier - Initial contribution
18 public enum ResponseStatus {
19 NO_INFORMATION((byte) 0x00),
22 INTERMEDIATE((byte) 0x03),
23 VENTILATION((byte) 0x04),
24 BLOCKING((byte) 0x05),
25 OVERHEATED((byte) 0x06),
27 START_MOVE_UP((byte) 0x08),
28 START_MOVE_DOWN((byte) 0x09),
29 MOVING_UP((byte) 0x0a),
30 MOVING_DOWN((byte) 0x0b),
32 TOP_TILT((byte) 0x0e),
33 BOTTOM_INTERMEDIATE((byte) 0x0f),
34 SWITCHED_OFF((byte) 0x10),
35 SWITCHED_ON((byte) 0x11);
37 public static final byte EASY_CONFIRM = (byte) 0x4B;
38 public static final byte EASY_ACK = (byte) 0x4D;
40 private byte statusByte;
42 private ResponseStatus(byte statusByte) {
43 this.statusByte = statusByte;
46 public static ResponseStatus getFor(byte statusByte) {
47 if (statusByte <= MOVING_DOWN.statusByte) {
48 return ResponseStatus.values()[statusByte];
50 return ResponseStatus.values()[statusByte - 1];
53 public static int getPercentageFor(ResponseStatus status) {