2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.boschshc.internal.services.multilevelswitch.dto;
15 import org.openhab.binding.boschshc.internal.services.dto.BoschSHCServiceState;
16 import org.openhab.core.library.types.PercentType;
19 * State for devices with switches that can have multiple different levels.
21 * @author David Pace - Initial contribution
24 public class MultiLevelSwitchServiceState extends BoschSHCServiceState {
26 public MultiLevelSwitchServiceState() {
27 super("multiLevelSwitchState");
31 * Represents a percentage level between 0 and 100
35 public PercentType toPercentType() {
36 return new PercentType(level);