forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[hdpowerview] Add support for repeaters (openhab#12061)
* Add support for repeaters. Fixes openhab#12060 Signed-off-by: Jacob Laursen <[email protected]> * Simplify thing type filtering. Signed-off-by: Jacob Laursen <[email protected]> * Improve robustness of configuration ID validation/initialization. Signed-off-by: Jacob Laursen <[email protected]> * Convert repeater-identify to command channel. Signed-off-by: Jacob Laursen <[email protected]> * Fix logged warning. Signed-off-by: Jacob Laursen <[email protected]> * Skip unneeded bridge status logic. Signed-off-by: Jacob Laursen <[email protected]> * Skip redundant logging. Signed-off-by: Jacob Laursen <[email protected]> * Fix chanenl type label for blinking enabled. Signed-off-by: Jacob Laursen <[email protected]> Signed-off-by: Andras Uhrin <[email protected]>
- Loading branch information
Showing
17 changed files
with
682 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...src/main/java/org/openhab/binding/hdpowerview/internal/api/requests/RepeaterBlinking.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright (c) 2010-2022 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.hdpowerview.internal.api.requests; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* State of a single Repeater for being updated by an HD PowerView Hub | ||
* | ||
* @author Jacob Laursen - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class RepeaterBlinking { | ||
public Repeater repeater; | ||
|
||
public class Repeater { | ||
public int id; | ||
public boolean blinkEnabled; | ||
|
||
public Repeater(int id, boolean enable) { | ||
this.id = id; | ||
this.blinkEnabled = enable; | ||
} | ||
} | ||
|
||
public RepeaterBlinking(int id, boolean enable) { | ||
repeater = new Repeater(id, enable); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...erview/src/main/java/org/openhab/binding/hdpowerview/internal/api/responses/Repeater.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Copyright (c) 2010-2022 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.hdpowerview.internal.api.responses; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.eclipse.jdt.annotation.Nullable; | ||
|
||
/** | ||
* State of a single Repeater, as returned by an HD PowerView Hub | ||
* | ||
* @author Jacob Laursen - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class Repeater { | ||
public @Nullable RepeaterData repeater; | ||
} |
Oops, something went wrong.