From 17fa26382760c94caf9547becc44ad702acad9d7 Mon Sep 17 00:00:00 2001 From: PeyserB <63269689+PeyserB@users.noreply.github.com> Date: Sat, 27 Jun 2020 14:56:33 -0400 Subject: [PATCH 1/2] Prevent bad values from humidity sensor Add a check to make sure the thermostat returns a humidity value between 0 and 100. My sensor sometimes returns bad values, such as '-124' that should not get written out. Anything outside that range is also bad for g/m^3, also. --- Drivers/Honeywell/Advanced-Honeywell-T6-Pro.groovy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Drivers/Honeywell/Advanced-Honeywell-T6-Pro.groovy b/Drivers/Honeywell/Advanced-Honeywell-T6-Pro.groovy index 7e10864..e8ebdc8 100644 --- a/Drivers/Honeywell/Advanced-Honeywell-T6-Pro.groovy +++ b/Drivers/Honeywell/Advanced-Honeywell-T6-Pro.groovy @@ -449,7 +449,11 @@ void zwaveEvent(hubitat.zwave.commands.sensormultilevelv5.SensorMultilevelReport eventProcess(name: "temperature", value: cmd.scaledSensorValue, unit: cmd.scale == 1 ? "F" : "C") } else if (cmd.sensorType.toInteger() == 5) { if (logEnable) log.debug "got temp: ${cmd.scaledSensorValue}" - eventProcess(name: "humidity", value: Math.round(cmd.scaledSensorValue), unit: cmd.scale == 0 ? "%": "g/m³") + if (cmd.scaledSensorValue >= 0 && cmd.scaledSensorValue <= 100) { + eventProcess(name: "humidity", value: Math.round(cmd.scaledSensorValue), unit: cmd.scale == 0 ? "%": "g/m³") + } else { + log.info "Skipped processing humidity sensor value: ${cmd.scaledSensorValue}" + } } } From dc99330e9a7c959f69775a589a983a6f4b55c6a5 Mon Sep 17 00:00:00 2001 From: PeyserB <63269689+PeyserB@users.noreply.github.com> Date: Tue, 30 Jun 2020 14:55:38 -0400 Subject: [PATCH 2/2] Add extra spaces in front of SET_THERMOSTAT_FAN_MODE Map The Hubitat (v2.2.1.116) sends requests to change mode with an extra space in front of fan mode settings. This works even with the bad requests by adding extra spaces to the SET_THERMOSTAT_FAN_MODE Map. --- Drivers/Honeywell/Advanced-Honeywell-T6-Pro.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Drivers/Honeywell/Advanced-Honeywell-T6-Pro.groovy b/Drivers/Honeywell/Advanced-Honeywell-T6-Pro.groovy index e8ebdc8..eed60f2 100644 --- a/Drivers/Honeywell/Advanced-Honeywell-T6-Pro.groovy +++ b/Drivers/Honeywell/Advanced-Honeywell-T6-Pro.groovy @@ -46,7 +46,7 @@ metadata { @Field static Map THERMOSTAT_MODE=[0x00:"off",0x01:"heat",0x02:"cool",0x03:"auto",0x04:"emergency heat"] @Field static Map SET_THERMOSTAT_MODE=["off":0x00,"heat":0x01,"cool":0x02,"auto":0x03,"emergency heat":0x04] @Field static Map THERMOSTAT_FAN_MODE=[0x00:"auto",0x01:"on",0x02:"auto",0x03:"on",0x04:"auto",0x05:"on",0x06:"circulate",0x07:"circulate"] -@Field static Map SET_THERMOSTAT_FAN_MODE=["auto":0x00,"on":0x01,"circulate":0x06] +@Field static Map SET_THERMOSTAT_FAN_MODE=["auto":0x00,"on":0x01,"circulate":0x06," auto":0x00," on":0x01," circulate":0x06] @Field static Map THERMOSTAT_FAN_STATE=[0x00:"idle", 0x01:"running", 0x02:"running high",0x03:"running medium",0x04:"circulation mode",0x05:"humidity circulation mode",0x06:"right - left circulation mode",0x07:"quiet circulation mode"] @Field static List supportedThermostatFanModes=["on","auto","circulate"] @Field static List supportedThermostatModes=["auto", "off", "heat", "emergency heat", "cool"]