forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes openhab#11533 Signed-off-by: Jacob Laursen <[email protected]>
- Loading branch information
Showing
5 changed files
with
177 additions
and
15 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
51 changes: 51 additions & 0 deletions
51
...rc/main/java/org/openhab/binding/hdpowerview/internal/api/responses/SceneCollections.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,51 @@ | ||
/** | ||
* Copyright (c) 2010-2021 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 java.util.Base64; | ||
import java.util.List; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.eclipse.jdt.annotation.Nullable; | ||
|
||
/** | ||
* State of all Scenes in an HD PowerView hub | ||
* | ||
* @author Jacob Laursen - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class SceneCollections { | ||
|
||
public @Nullable List<SceneCollection> sceneCollectionData; | ||
public @Nullable List<Integer> sceneCollectionIds; | ||
|
||
/* | ||
* the following SuppressWarnings annotation is because the Eclipse compiler | ||
* does NOT expect a NonNullByDefault annotation on the inner class, since it is | ||
* implicitly inherited from the outer class, whereas the Maven compiler always | ||
* requires an explicit NonNullByDefault annotation on all classes | ||
*/ | ||
@SuppressWarnings("null") | ||
@NonNullByDefault | ||
public static class SceneCollection { | ||
public int id; | ||
public @Nullable String name; | ||
public int order; | ||
public int colorId; | ||
public int iconId; | ||
|
||
public String getName() { | ||
return new String(Base64.getDecoder().decode(name)); | ||
} | ||
} | ||
} |
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