]> git.basschouten.com Git - openhab-addons.git/blob
b8832f22f63c17a5d7e890539c99714e914f086e
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 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.velux.internal.action;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * The {@link IVeluxActions} defines rule action interface for rebooting the bridge
19  *
20  * @author Andrew Fiddian-Green - Initial contribution
21  */
22 @NonNullByDefault
23 public interface IVeluxActions {
24
25     /**
26      * Action to send a reboot command to a Velux Bridge
27      *
28      * @return true if the command was sent
29      * @throws IllegalStateException if something is wrong
30      */
31     Boolean rebootBridge() throws IllegalStateException;
32
33     /**
34      * Action to send a relative move command to a Velux actuator
35      *
36      * @param nodeId the node Id in the bridge
37      * @param relativePercent the target position relative to its current position (-100% <= relativePercent <= +100%)
38      * @return true if the command was sent
39      * @throws NumberFormatException if either of the arguments is not an integer, or out of range
40      * @throws IllegalStateException if anything else is wrong
41      */
42     Boolean moveRelative(String nodeId, String relativePercent) throws NumberFormatException, IllegalStateException;
43 }