Skip to content

Commit

Permalink
[deconz] Added THING_TYPE_SWITCH as supported Thing and correction te…
Browse files Browse the repository at this point in the history
…mperature calculation (#4406)

- Added `THING_TYPE_SWITCH` as supported Thing
- Temperature and humidity have the unit 0.01˚C / 0.01% and must therefore be divided by 100. See here: https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Supported-Devices#measured-values-legend

Fixes #4402

Signed-off-by: Markus Schraufstetter <markus.schraufstetter@gmail.com>
  • Loading branch information
Markkuuss authored and cweitkamp committed Dec 21, 2018
1 parent adae151 commit af628c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
public class HandlerFactory extends BaseThingHandlerFactory {
private static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Stream
.of(BRIDGE_TYPE, THING_TYPE_PRESENCE_SENSOR, THING_TYPE_DAYLIGHT_SENSOR, THING_TYPE_POWER_SENSOR,
THING_TYPE_LIGHT_SENSOR, THING_TYPE_TEMPERATURE_SENSOR)
THING_TYPE_LIGHT_SENSOR, THING_TYPE_TEMPERATURE_SENSOR, THING_TYPE_SWITCH)
.collect(Collectors.toSet());

private @NonNullByDefault({}) WebSocketFactory webSocketFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public void valueUpdated(String channelID, SensorState state) {
break;
case BindingConstants.CHANNEL_TEMPERATURE:
if (temperature != null) {
updateState(channelID, new QuantityType<Temperature>(temperature, SIUnits.CELSIUS));
updateState(channelID, new QuantityType<Temperature>(temperature / 100, SIUnits.CELSIUS));
}
break;
case BindingConstants.CHANNEL_PRESENCE:
Expand Down

0 comments on commit af628c6

Please sign in to comment.