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.silentmode.dto;
15 import org.openhab.binding.boschshc.internal.services.dto.BoschSHCServiceState;
16 import org.openhab.binding.boschshc.internal.services.silentmode.SilentModeState;
17 import org.openhab.core.library.types.OnOffType;
20 * Represents the state of the silent mode for thermostats.
22 * Example JSON for normal mode:
26 * "@type": "silentModeState",
27 * "mode": "MODE_NORMAL"
31 * Example JSON for silent mode:
35 * "@type": "silentModeState",
36 * "mode": "MODE_SILENT"
40 * @author David Pace - Initial contribution
43 public class SilentModeServiceState extends BoschSHCServiceState {
45 public SilentModeServiceState() {
46 super("silentModeState");
49 public SilentModeState mode;
51 public OnOffType toOnOffType() {
52 return OnOffType.from(mode == SilentModeState.MODE_SILENT);