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.seneye.internal;
15 import org.openhab.core.library.types.DateTimeType;
18 * The Status of the seneye device
20 * @author Niko Tanghe - Initial contribution
23 public class SeneyeStatus {
24 public String disconnected;
25 public String slide_serial;
26 public String slide_expires;
27 public String out_of_water;
28 public String wrong_slide;
29 public String last_experiment;
31 public String getLast_experimentDate() {
32 return getTickAsDate(last_experiment);
35 public String getSlide_expiresDate() {
36 return getTickAsDate(slide_expires);
39 private String getTickAsDate(String tick) {
40 String date = new java.text.SimpleDateFormat(DateTimeType.DATE_PATTERN_WITH_TZ_AND_MS_ISO)
41 .format(new java.util.Date(Long.parseLong(tick) * 1000));
45 public String getWrong_slideString() {
49 public String getSlide_serialString() {
53 public String getOut_of_waterString() {
57 public String getDisconnectedString() {