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.novafinedust.internal.sds011protocol.messages;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * Reply from sensor to a set sleep command
20 * @author Stefan Triller - Initial contribution
24 public class SleepReply extends SensorReply {
26 private final byte actionType;
27 private final byte sleep;
29 public SleepReply(byte[] bytes) {
32 this.actionType = bytes[3];
33 this.sleep = bytes[4];
37 * Get the type of action
39 * @return 0 = query 1 = set mode
41 public byte getActionType() {
46 * Get the info whether this is a sleep or wakeup reply
48 * @return 0 = sleep 1 = work
50 public byte getSleep() {
55 public String toString() {
56 return "SleepReply: [sleep=" + sleep + "]";