Skip to content

Reading State

Niklas Linz edited this page Oct 3, 2026 · 1 revision

Reading state

state

<base>/<device>/state carries the complete state of a unit as one JSON object. It is published after every refresh, every confirmed command and every change the unit reports on its own (see How it behaves).

{
  "available": true,
  "lastUpdate": "2026-10-03T18:57:36.539Z",
  "power": true,
  "mode": "cool",
  "activeMode": "cool",
  "targetTemperature": 22.5,
  "fanSpeed": "auto",
  "fanSpeedRaw": 102,
  "swing": "vertical",
  "preset": "none",
  "screenDisplay": true,
  "indoorTemperature": 24.1,
  "outdoorTemperature": 29.8,
  "indoorHumidity": 55,
  "realtimePower": 891.2,
  "totalEnergyConsumption": 123.45,
  "errorCode": 0
}

(shortened)

General rules:

  • Temperatures are always Celsius, even if the unit's display shows Fahrenheit.
  • Values the unit hasn't reported are left out, not sent as null. Many units never send energy, humidity or service data.
  • Enum values are lower case: fan_only, left_mid.
  • Keys marked ✎ can be written with the same name and value format, see Sending commands. You can send back what you read.

Status

Key Type
available boolean unit answered the last refresh
lastUpdate string time of the last successful refresh, ISO 8601 UTC
errorCode number error reported by the unit, 0 if none
fullDust boolean filter needs cleaning

Basic settings

Key Type
power ✎ boolean
mode ✎ string auto, cool, dry, heat, fan_only; also reported while off
activeMode string like mode, but missing while the unit is off
targetTemperature ✎ number set point, 0.5 steps
fanSpeed ✎ string silent, low, medium, high, full, auto
fanSpeedRaw number 1 to 100, or 102 for auto. Units with stepless fans report values in between
swing ✎ string off, vertical, horizontal, both
swingVertical, swingHorizontal boolean the two halves of swing
preset ✎ string none, comfort, eco, boost, sleep, away
eco, boost, sleep, comfort, frostProtect boolean the individual preset flags (away = frostProtect)
powerSaving ✎ boolean
auxHeating ✎, dry ✎, smartEye ✎, naturalWind ✎, anion ✎ boolean
fahrenheit ✎ boolean display shows Fahrenheit

Extra features

Key Type
screenDisplay ✎ boolean LED display on
screenDisplayAlternate ✎ boolean display, for units using the newer protocol
breezeless ✎, indirectWind ✎ boolean
horizontalVane ✎ string off, left, left_mid, middle, right_mid, right; missing if not reported or between positions
verticalVane ✎ string off, up, up_mid, middle, down_mid, down; same
outdoorSilent ✎ boolean quiet outdoor unit
sound ✎ boolean indoor unit buzzer
selfClean ✎ boolean self cleaning running
rateSelect ✎ number power limit in percent
freshAir ✎, freshAirFanSpeed ✎ boolean, number only present on units with a fresh air module

Sensors

Key Type
indoorTemperature, outdoorTemperature number °C
indoorHumidity number %
pmv number comfort index, if reported
minTemperature, maxTemperature number allowed set point range for the current mode

Energy

Key Unit
realtimePower W
totalEnergyConsumption, totalOperatingConsumption, currentEnergyConsumption kWh
electrifyTime, totalOperatingTime, currentOperatingTime h

If the figures look absurd, try another powerAnalysisMethod in the configuration.

Service data

Only on units that report it: compressorFrequency, targetCompressorFrequency, compressorCurrent, compressorVoltage, compressorPower, indoorAmbientTemperature, indoorCoilTemperature, outdoorCoilTemperature, outdoorAmbientTemperature, dischargePipeTemperature, indoorFanSpeed, targetIndoorFanSpeed, outdoorFanSpeed, waterPumpRunning.

Single values

With publishAttributes: true every key is also published on its own topic, as plain text:

midea2mqtt/livingroom/state/indoorTemperature   24.1
midea2mqtt/livingroom/state/mode                cool
midea2mqtt/livingroom/state/power               true

Handy for tools that can't parse JSON. It produces around 50 messages per refresh and unit, so leave it off if you don't need it.

capabilities

<base>/<device>/capabilities says what the unit supports. It's read once, on the first refresh, and published again on every get and broker reconnect.

{
  "received": true,
  "modes": ["auto", "cool", "dry", "heat", "fan_only"],
  "temperatureLimits": {
    "cool": [17, 30],
    "heat": [16, 30],
    "auto": [17, 30],
    "dry": [17, 30],
    "fan_only": [17, 30]
  },
  "features": {
    "swing_horizontal": false,
    "swing_vertical": true,
    "fan_silent": true,
    "eco": true,
    "display_control": true
  }
}
  • received is false if the unit didn't answer the capability query. Then everything else is empty.
  • A feature missing from features wasn't mentioned by the unit; that doesn't necessarily mean it's unsupported.
  • Feature names are the ones midea-local uses: heat_mode, cool_mode, dry_mode, auto_mode, swing_horizontal, swing_vertical, swing_horizontal_angle, swing_vertical_angle, fan_silent, fan_low, fan_medium, fan_high, fan_auto, fan_custom, eco, anion, turbo_cool, turbo_heat, display_control, energy_stats, energy_setting, energy_bcd, rate_select, rate_select_2_level, rate_select_5_level, sound, humidity.

Clone this wiki locally