diff --git a/plugins/thermostat/package-lock.json b/plugins/thermostat/package-lock.json index deb1332c0..04847218a 100644 --- a/plugins/thermostat/package-lock.json +++ b/plugins/thermostat/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/thermostat", - "version": "0.0.27", + "version": "0.0.29", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@scrypted/thermostat", - "version": "0.0.27", + "version": "0.0.29", "license": "Apache", "devDependencies": { "@scrypted/sdk": "file:../../sdk" diff --git a/plugins/thermostat/package.json b/plugins/thermostat/package.json index 4aafb26d6..9cda3343c 100644 --- a/plugins/thermostat/package.json +++ b/plugins/thermostat/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/thermostat", - "version": "0.0.27", + "version": "0.0.29", "description": "Create a virtual thermostat from a temperature sensor and smart plug connected to heater or AC unit.", "author": "Scrypted", "license": "Apache", @@ -26,8 +26,7 @@ "Settings", "Thermometer", "TemperatureSetting", - "HumiditySensor", - "HumiditySetting" + "HumiditySensor" ], "type": "Thermostat" }, diff --git a/plugins/thermostat/src/main.ts b/plugins/thermostat/src/main.ts index c546f3272..cd4314243 100644 --- a/plugins/thermostat/src/main.ts +++ b/plugins/thermostat/src/main.ts @@ -295,10 +295,10 @@ class ThermostatDevice extends ScryptedDeviceBase implements TemperatureSetting, } async setThermostatMode(mode) { log.i('thermostat mode set to ' + mode); - if (mode == 'On') { + if (mode === ThermostatMode.On || mode == ThermostatMode.Auto) { mode = this.storage.getItem("lastThermostatMode"); } - else if (mode != 'Off') { + else if (mode != ThermostatMode.Off) { this.storage.setItem("lastThermostatMode", mode); } this.thermostatMode = mode;