]> git.basschouten.com Git - openhab-addons.git/blob
bb793b6e39756cb3bc87f4321bab568c8790fe37
[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.max.internal.device;
14
15 import org.openhab.core.library.types.OpenClosedType;
16
17 /**
18  * MAX! Shutter contact device.
19  *
20  * @author Andreas Heil - Initial contribution
21  * @author Marcel Verpaalen - OH2 update
22  */
23 public class ShutterContact extends Device {
24
25     private OpenClosedType shutterState;
26
27     public ShutterContact(DeviceConfiguration c) {
28         super(c);
29     }
30
31     public void setShutterState(OpenClosedType shutterState) {
32         if (this.shutterState != shutterState) {
33             setUpdated(true);
34         }
35         this.shutterState = shutterState;
36     }
37
38     public OpenClosedType getShutterState() {
39         return shutterState;
40     }
41
42     @Override
43     public DeviceType getType() {
44         return DeviceType.ShutterContact;
45     }
46 }