Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[deconz] Add support for ZHAThermostat #7828

Merged
merged 8 commits into from
Jun 7, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
Expand Down Expand Up @@ -61,8 +59,7 @@
*/
@NonNullByDefault
public class SensorThermostatThingHandler extends SensorBaseThingHandler {
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = Collections
.unmodifiableSet(Stream.of(THING_TYPE_THERMOSTAT).collect(Collectors.toSet()));
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = Collections.singleton(THING_TYPE_THERMOSTAT);

private static final List<String> CONFIG_CHANNELS = Arrays.asList(CHANNEL_BATTERY_LEVEL, CHANNEL_BATTERY_LOW,
CHANNEL_HEATSETPOINT, CHANNEL_TEMPERATURE_OFFSET, CHANNEL_THERMOSTAT_MODE);
Expand Down Expand Up @@ -181,29 +178,6 @@ protected void valueUpdated(String channelID, SensorState newState, boolean init

@Override
protected void createTypeSpecificChannels(SensorConfig sensorConfig, SensorState sensorState) {
LukasA83 marked this conversation as resolved.
Show resolved Hide resolved
/*
* // some Xiaomi sensors
* if (sensorConfig.temperature != null || sensorState.temperature != null) {
* createChannel(CHANNEL_TEMPERATURE, ChannelKind.STATE);
* }
*
* // (Eurotronics) Thermostat
* if (sensorState.valve != null) {
* createChannel(CHANNEL_VALVE_POSITION, ChannelKind.STATE);
* }
*
* if (sensorConfig.heatsetpoint != null) {
* createChannel(CHANNEL_HEATSETPOINT, ChannelKind.STATE);
* }
*
* if (sensorConfig.mode != null) {
* createChannel(CHANNEL_THERMOSTAT_MODE, ChannelKind.STATE);
* }
*
* if (sensorConfig.offset != null) {
* createChannel(CHANNEL_TEMPERATURE_OFFSET, ChannelKind.STATE);
* }
*/
}

@Override
Expand Down