Reading State - LinzN/midea2mqtt GitHub Wiki
<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.
| 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 |
| 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 |
| 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 |
| 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 |
| Key | Unit |
|---|---|
realtimePower |
W |
totalEnergyConsumption, totalOperatingConsumption, currentEnergyConsumption
|
kWh |
electrifyTime, totalOperatingTime, currentOperatingTime
|
h |
If the figures look absurd, try another powerAnalysisMethod in the configuration.
Only on units that report it: compressorFrequency, targetCompressorFrequency, compressorCurrent, compressorVoltage, compressorPower, indoorAmbientTemperature, indoorCoilTemperature, outdoorCoilTemperature, outdoorAmbientTemperature, dischargePipeTemperature, indoorFanSpeed, targetIndoorFanSpeed, outdoorFanSpeed, waterPumpRunning.
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.
<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
}
}-
receivedisfalseif the unit didn't answer the capability query. Then everything else is empty. - A feature missing from
featureswasn'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.