Skip to content

Commit

Permalink
Merge pull request #15 from mgr01/master
Browse files Browse the repository at this point in the history
Fix humidity offset for RM4 devices.
  • Loading branch information
themillhousegroup authored Jan 6, 2021
2 parents 48bc5df + 960b219 commit 1e513a7
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 @@ -54,7 +54,7 @@ protected boolean getStatusFromDevice() {
// mirroring the request
float temperature = (float) ((double) (decodedPayload[6] * 100 + decodedPayload[7]) / 100D);
updateState("temperature", new DecimalType(temperature));
float humidity = (float) ((double) (decodedPayload[8] * 100 + decodedPayload[8]) / 100D);
float humidity = (float) ((double) (decodedPayload[8] * 100 + decodedPayload[9]) / 100D);
updateState("humidity", new DecimalType(humidity));
return true;
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void setsTheTemperatureAndHumidityChannelsAfterGettingStatus() {
ChannelUID expectedHumidityChannel = new ChannelUID(thing.getUID(), "humidity");
assertEquals(expectedHumidityChannel, channelCaptures.get(1));

DecimalType expectedHumidity = new DecimalType(-85.8499984741211D);
DecimalType expectedHumidity = new DecimalType(-85.81999969482422D);
assertEquals(expectedHumidity, stateCaptures.get(1));
}
}

0 comments on commit 1e513a7

Please sign in to comment.