]> git.basschouten.com Git - openhab-addons.git/blob
408d017430699f6939c6db2c51599fc07fc9aa56
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.gardena.internal.model.dto.command;
14
15 /**
16  * Represents a Gardena command object that is sent to the Gardena API.
17  *
18  * @author Gerhard Riegler - Initial contribution
19  */
20 public class ValveCommand extends GardenaCommand {
21     private static final String COMMAND_TYPE = "VALVE_CONTROL";
22
23     public static enum ValveControl {
24         START_SECONDS_TO_OVERRIDE,
25         STOP_UNTIL_NEXT_TASK,
26         PAUSE,
27         UNPAUSE
28     }
29
30     public ValveCommand(ValveControl valveControl, Integer seconds) {
31         this.id = "vcid";
32         this.type = COMMAND_TYPE;
33         this.attributes = new GardenaCommandAttributes(valveControl.name(), seconds);
34     }
35 }