]> git.basschouten.com Git - openhab-addons.git/blob
b4f56fa601af5856b2bf9daae622185526cd38cf
[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.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 PowerSocketCommand extends GardenaCommand {
21     private static final String COMMAND_TYPE = "POWER_SOCKET_CONTROL";
22
23     public enum PowerSocketControl {
24         START_SECONDS_TO_OVERRIDE,
25         START_OVERRIDE,
26         STOP_UNTIL_NEXT_TASK,
27         PAUSE,
28         UNPAUSE
29     }
30
31     public PowerSocketCommand(PowerSocketControl powerSocketControl, Integer seconds) {
32         this.id = "pscid";
33         this.type = COMMAND_TYPE;
34         this.attributes = new GardenaCommandAttributes(powerSocketControl.name(), seconds);
35     }
36 }