From c5be88700ab410297c52fef8cf68018b2beedc38 Mon Sep 17 00:00:00 2001 From: Seth Kinast Date: Tue, 6 Dec 2022 20:44:59 -0800 Subject: [PATCH] Override built-in mode/fanMode commands so the correct enum values show on the device edit page --- hubitat-mitsubishi-mqtt.groovy | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hubitat-mitsubishi-mqtt.groovy b/hubitat-mitsubishi-mqtt.groovy index 106aea4..df01c5b 100644 --- a/hubitat-mitsubishi-mqtt.groovy +++ b/hubitat-mitsubishi-mqtt.groovy @@ -34,8 +34,8 @@ import groovy.transform.Field import groovy.json.JsonSlurper import groovy.json.JsonOutput -@Field static List supportedThermostatFanModes = ['1', '2', '3', '4', 'auto', 'quiet'] -@Field static List supportedThermostatModes = ['heat', 'cool', 'fan', 'dry', 'auto', 'off'] +@Field static List supportedThermostatFanModes = ['auto', 'quiet', '1', '2', '3', '4'] +@Field static List supportedThermostatModes = ['auto', 'off', 'cool', 'heat', 'fan', 'dry'] @Field static Map thermostatModeMapping = [ 'HEAT': 'heat', @@ -85,6 +85,9 @@ metadata { attribute 'vane', 'enum', vanePositions attribute 'wideVane', 'enum', wideVanePositions + command 'setThermostatFanMode', [[name: 'Set Thermostat Fan Mode', type: 'ENUM', constraints: supportedThermostatFanModes]] + command 'setThermostatMode', [[name: 'Set Thermostat Mode', type: 'ENUM', constraints: supportedThermostatModes]] + command 'dry' command 'vane', [[name: 'Position*', type: 'ENUM', constraints: vanePositions]] command 'wideVane', [[name: 'Position*', type: 'ENUM', constraints: wideVanePositions]]