message: fix: Error map used before definition
diff: @@ -611,6 +611,8 @@ Gateway.prototype.discoverDevice = function (node, hassDevice) {
  var mode = node.values[payload.mode_state_topic]
  var currTemp = node.values[payload.current_temperature_topic]
  var setId
  + var map = getMappedValues(mode, hassDevice.mode_map, this.config.integerList)
  +
  if (mode !== undefined) {
  setId = hassDevice.setpoint_topic && hassDevice.setpoint_topic[mode.value] ? hassDevice.setpoint_topic[mode.value] : hassDevice.default_setpoint
  // only setup modes if a state topic was defined
  @@ -621,7 +623,6 @@ Gateway.prototype.discoverDevice = function (node, hassDevice) {
  setId = hassDevice.default_setpoint
  }
  var setpoint = node.values[setId]
  - var map = getMappedValues(mode, hassDevice.mode_map, this.config.integerList)
  payload.current_temperature_topic = this.mqtt.getTopic(this.valueTopic(node, currTemp))
  payload.temperature_state_topic = this.mqtt.getTopic(this.valueTopic(node, setpoint))
  