]> git.basschouten.com Git - openhab-addons.git/blob
0a6f8d28f9820a4c7cde80709977f89c5a9c69bd
[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.netatmo.internal.welcome;
14
15 import static org.openhab.binding.netatmo.internal.NetatmoBindingConstants.*;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.binding.netatmo.internal.camera.CameraHandler;
19 import org.openhab.core.i18n.TimeZoneProvider;
20 import org.openhab.core.thing.Thing;
21 import org.openhab.core.types.State;
22
23 /**
24  * {@link NAWelcomeCameraHandler} is the class used to handle the Welcome Camera Data
25  *
26  * @author Ing. Peter Weiss - Initial contribution
27  *
28  */
29 @NonNullByDefault
30 public class NAWelcomeCameraHandler extends CameraHandler {
31
32     public NAWelcomeCameraHandler(Thing thing, final TimeZoneProvider timeZoneProvider) {
33         super(thing, timeZoneProvider);
34     }
35
36     @Override
37     protected State getNAThingProperty(String channelId) {
38         switch (channelId) {
39             case CHANNEL_WELCOME_CAMERA_STATUS:
40                 return getStatusState();
41             case CHANNEL_WELCOME_CAMERA_SDSTATUS:
42                 return getSdStatusState();
43             case CHANNEL_WELCOME_CAMERA_ALIMSTATUS:
44                 return getAlimStatusState();
45             case CHANNEL_WELCOME_CAMERA_ISLOCAL:
46                 return getIsLocalState();
47             case CHANNEL_WELCOME_CAMERA_LIVEPICTURE_URL:
48                 return getLivePictureURLState();
49             case CHANNEL_WELCOME_CAMERA_LIVEPICTURE:
50                 return getLivePictureState();
51             case CHANNEL_WELCOME_CAMERA_LIVESTREAM_URL:
52                 return getLiveStreamState();
53         }
54         return super.getNAThingProperty(channelId);
55     }
56 }