From 961283315d2d347ec5ef6ee2daf756b4519b5982 Mon Sep 17 00:00:00 2001 From: Arthur Krupa Date: Mon, 29 Apr 2019 09:52:27 +0200 Subject: [PATCH] Fix #37 incorrect temperature argument --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9862399..0dd7869 100644 --- a/index.js +++ b/index.js @@ -54,10 +54,10 @@ const publishIfChanged = function (stateProp, newValue, mqttTopic) { const deviceOptions = { host: argv['hvac-host'], onStatus: (deviceModel) => { - publishIfChanged('temperature', getKeyByValue(deviceModel.props[commands.temperature.code]).toString(), '/temperature/get') + publishIfChanged('temperature', deviceModel.props[commands.temperature.code].toString(), '/temperature/get') publishIfChanged('fanSpeed', getKeyByValue(commands.fanSpeed.value, deviceModel.props[commands.fanSpeed.code]).toString(), '/fanspeed/get') publishIfChanged('swingHor', getKeyByValue(commands.swingHor.value, deviceModel.props[commands.swingHor.code]).toString(), '/swinghor/get') - publishIfChanged('swingVert', getKeyByValue(commands.swingHor.value, deviceModel.props[commands.swingVert.code]).toString(), '/swingvert/get') + publishIfChanged('swingVert', getKeyByValue(commands.swingVert.value, deviceModel.props[commands.swingVert.code]).toString(), '/swingvert/get') publishIfChanged('swingVert', getKeyByValue(commands.power.value, deviceModel.props[commands.power.code]).toString(), '/power/get') publishIfChanged('health', getKeyByValue(commands.health.value, deviceModel.props[commands.health.code]).toString(), '/health/get') publishIfChanged('powerSave', getKeyByValue(commands.powerSave.value, deviceModel.props[commands.powerSave.code]).toString(), '/powersave/get')