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.nikohomecontrol.internal.protocol.nhc1;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
17 import org.openhab.binding.nikohomecontrol.internal.protocol.NhcThermostat;
18 import org.openhab.binding.nikohomecontrol.internal.protocol.NikoHomeControlCommunication;
19 import org.slf4j.Logger;
20 import org.slf4j.LoggerFactory;
23 * The {@link NhcThermostat1} class represents the thermostat Niko Home Control I communication object. It contains all
24 * fields representing a Niko Home Control thermostat and has methods to set the thermostat in Niko Home Control and
25 * receive thermostat updates.
27 * @author Mark Herwege - Initial Contribution
30 public class NhcThermostat1 extends NhcThermostat {
32 private final Logger logger = LoggerFactory.getLogger(NhcThermostat1.class);
34 NhcThermostat1(String id, String name, @Nullable String location, NikoHomeControlCommunication nhcComm) {
35 super(id, name, location, nhcComm);
39 * Sends thermostat mode to Niko Home Control.
44 public void executeMode(int mode) {
45 logger.debug("execute thermostat mode {} for {}", mode, id);
47 nhcComm.executeThermostat(id, Integer.toString(mode));
51 * Sends thermostat setpoint to Niko Home Control.
53 * @param overrule temperature to overrule the setpoint in 0.1°C multiples
54 * @param time time duration in min for overrule
57 public void executeOverrule(int overrule, int overruletime) {
58 logger.debug("execute thermostat overrule {} during {} min for {}", overrule, overruletime, id);
60 nhcComm.executeThermostat(id, overrule, overruletime);