]> git.basschouten.com Git - openhab-addons.git/blob
7584a2f94e832d8c39fb1b8f7b121264df87c2bb
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.hydrawise.internal.api.local.dto;
14
15 /**
16  * The {@link Relay} class models the Relay response message
17  *
18  * @author Dan Cunningham - Initial contribution
19  */
20 public class Relay {
21
22     public Integer relayId;
23
24     public Integer time;
25
26     public Integer type;
27
28     public Integer relay;
29
30     public String name;
31
32     public Integer frequency;
33
34     public String timestr;
35
36     public Integer runSeconds;
37
38     /**
39      * Returns back the actual relay number when multiple controllers are chained.
40      *
41      * @return
42      */
43     public int getRelayNumber() {
44         int quotient = relay / 100;
45         return (relay - (quotient * 100)) + (quotient * 12);
46     }
47 }