Skip to content

Commit

Permalink
Override built-in mode/fanMode commands so the correct enum values sh…
Browse files Browse the repository at this point in the history
…ow on the device edit page
  • Loading branch information
sethkinast committed Dec 7, 2022
1 parent fc27999 commit c5be887
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hubitat-mitsubishi-mqtt.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import groovy.transform.Field
import groovy.json.JsonSlurper
import groovy.json.JsonOutput

@Field static List<String> supportedThermostatFanModes = ['1', '2', '3', '4', 'auto', 'quiet']
@Field static List<String> supportedThermostatModes = ['heat', 'cool', 'fan', 'dry', 'auto', 'off']
@Field static List<String> supportedThermostatFanModes = ['auto', 'quiet', '1', '2', '3', '4']
@Field static List<String> supportedThermostatModes = ['auto', 'off', 'cool', 'heat', 'fan', 'dry']

@Field static Map thermostatModeMapping = [
'HEAT': 'heat',
Expand Down Expand Up @@ -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]]
Expand Down

0 comments on commit c5be887

Please sign in to comment.