We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 887b471 commit 2e7c86eCopy full SHA for 2e7c86e
lib/switchbot-advertising.js
@@ -201,8 +201,7 @@ class SwitchbotAdvertising {
201
202
const temp_sign = byte4 & 0b10000000 ? 1 : -1;
203
const temp_c = temp_sign * ((byte4 & 0b01111111) + (byte3 & 0b00001111) / 10);
204
- const temp_f = (temp_c * 9 / 5) + 32;
205
- temp_f = Math.round(temp_f * 10) / 10;
+ const temp_f = Math.round(((temp_c * 9 / 5) + 32) * 10) / 10;
206
207
const data = {
208
model: "T",
0 commit comments