]> git.basschouten.com Git - openhab-addons.git/blob
2a33e902def880edfa4dc93c83a0158552957867
[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.bosesoundtouch.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17
18 /**
19  * Configuration class for soundtouch notification channel
20  *
21  * @author Ivaylo Ivanov - Initial contribution
22  */
23 @NonNullByDefault
24 public class BoseSoundTouchNotificationChannelConfiguration {
25
26     public static final String MIN_FIRMWARE = "14";
27     public static final String MODEL_TYPE = "sm2";
28
29     public static final String NOTIFICATION_VOLUME = "notificationVolume";
30     public static final String NOTIFICATION_SERVICE = "notificationService";
31     public static final String NOTIFICATION_REASON = "notificationReason";
32     public static final String NOTIFICATION_MESSAGE = "notificationMessage";
33
34     public @Nullable Integer notificationVolume;
35     public @Nullable String notificationService;
36     public @Nullable String notificationReason;
37     public @Nullable String notificationMessage;
38
39     public static boolean isSupportedFirmware(String firmware) {
40         return firmware.compareTo(MIN_FIRMWARE) > 0;
41     }
42
43     public static boolean isSupportedHardware(String hardware) {
44         return MODEL_TYPE.equals(hardware);
45     }
46 }