Skip to content

Commit 91f62ed

Browse files
committed
fix(Thermostat): Allow powerState to be set via inbound msg; fix #80
1 parent 7e231d5 commit 91f62ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

device-types.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ const temperatureValue = (val) => {
340340
if (!isValid) {
341341
return false
342342
}
343-
return { key: 'temperature', value: floatValue }
343+
return { key: 'temperature', value: Math.round(floatValue * 10) / 10 } //23.456789 --> 23.4
344344
}
345345

346346
const temperatureScale = (val) => {
@@ -676,6 +676,7 @@ const types = {
676676
thermostatMode,
677677
targetTemperature: wrapValidator(temperatureValue, 'targetTemperature'),
678678
targetScale: wrapValidator(temperatureScale, 'targetScale'),
679+
powerState,
679680
},
680681
decorator: defaultDecorator,
681682
},

0 commit comments

Comments
 (0)