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.hue.internal.dto.clip2;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.openhab.core.library.types.OnOffType;
17 import org.openhab.core.types.State;
18 import org.openhab.core.types.UnDefType;
20 import com.google.gson.annotations.SerializedName;
23 * DTO for CLIP 2 motion sensor.
25 * @author Andrew Fiddian-Green - Initial contribution
29 private boolean motion;
30 private @SerializedName("motion_valid") boolean motionValid;
32 public boolean isMotion() {
36 public boolean isMotionValid() {
40 public State getMotionState() {
41 return motionValid ? OnOffType.from(motion) : UnDefType.UNDEF;
44 public State getMotionValidState() {
45 return OnOffType.from(motionValid);