]> git.basschouten.com Git - openhab-addons.git/blob
d7a8ed25ea0d3586b0bb42caea4fa805ed4fa727
[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
14 package org.openhab.binding.nanoleaf.internal.layout;
15
16 import org.eclipse.jdt.annotation.NonNullByDefault;
17 import org.openhab.core.library.types.HSBType;
18
19 /**
20  * Always returns the same color for all panels.
21  *
22  * @author Jørgen Austvik - Initial contribution
23  */
24 @NonNullByDefault
25 public class ConstantPanelState implements PanelState {
26     private final HSBType color;
27
28     public ConstantPanelState(HSBType color) {
29         this.color = color;
30     }
31
32     @Override
33     public HSBType getHSBForPanel(Integer panelId) {
34         return color;
35     }
36 }