]> git.basschouten.com Git - openhab-addons.git/blob
d9394692eec37316ae8438565cee24c7fabc884a
[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.boschshc.internal.services.multilevelswitch.dto;
14
15 import org.openhab.binding.boschshc.internal.services.dto.BoschSHCServiceState;
16 import org.openhab.core.library.types.PercentType;
17
18 /**
19  * State for devices with switches that can have multiple different levels.
20  *
21  * @author David Pace - Initial contribution
22  *
23  */
24 public class MultiLevelSwitchServiceState extends BoschSHCServiceState {
25
26     public MultiLevelSwitchServiceState() {
27         super("multiLevelSwitchState");
28     }
29
30     /**
31      * Represents a percentage level between 0 and 100
32      */
33     public int level;
34
35     public PercentType toPercentType() {
36         return new PercentType(level);
37     }
38 }