]> git.basschouten.com Git - openhab-addons.git/blob
bb12d39a7dde2f62096aa88292a00d281c2feca5
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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 /**
16  * Configuration class for soundtouch notification channel
17  *
18  * @author Ivaylo Ivanov - Initial contribution
19  */
20 public class BoseSoundTouchNotificationChannelConfiguration {
21
22     public static final String MIN_FIRMWARE = "14";
23     public static final String MODEL_TYPE = "sm2";
24
25     public static final String NOTIFICATION_VOLUME = "notificationVolume";
26     public static final String NOTIFICATION_SERVICE = "notificationService";
27     public static final String NOTIFICATION_REASON = "notificationReason";
28     public static final String NOTIFICATION_MESSAGE = "notificationMessage";
29
30     public Integer notificationVolume;
31     public String notificationService;
32     public String notificationReason;
33     public String notificationMessage;
34
35     public static boolean isSupportedFirmware(String firmware) {
36         return firmware != null && firmware.compareTo(MIN_FIRMWARE) > 0;
37     }
38
39     public static boolean isSupportedHardware(String hardware) {
40         return MODEL_TYPE.equals(hardware);
41     }
42 }