Midea Air Conditioner¶
midea component creates a Midea air conditioner climate device.
This protocol also used by some vendors:
Control is possible with a custom dongle. Example of hardware implementation is IoT Uni Dongle.
# Example configuration entry # Disable logging over UART (required) logger: baud_rate: 0 # UART settings for Midea dongle (required) uart: tx_pin: 1 # hardware dependant rx_pin: 3 # hardware dependant baud_rate: 9600 # Main settings climate: - platform: midea name: Midea Climate # Use a unique name. transmitter_id: # Optional. Add this option to use IR transmitter. period: 1s # Optional timeout: 2s # Optional num_attempts: 3 # Optional autoconf: true # Autoconfigure most options. beeper: true # Beep on commands. visual: # Optional. Example of visual settings override. min_temperature: 17 °C # min: 17 max_temperature: 30 °C # max: 30 temperature_step: 0.5 °C # min: 0.5 supported_modes: # All capabilities in this section detected by autoconf. - FAN_ONLY # This capability is always used. - HEAT_COOL - COOL - HEAT - DRY custom_fan_modes: - SILENT - TURBO supported_presets: # All capabilities in this section detected by autoconf. - ECO - BOOST - SLEEP # This capability is always used. custom_presets: # All capabilities in this section detected by autoconf. - FREEZE_PROTECTION supported_swing_modes: - VERTICAL # This capability is always used. - HORIZONTAL - BOTH outdoor_temperature: # Optional. Outdoor temperature sensor (may display incorrect values after long inactivity). name: Temp power_usage: # Optional. Power usage sensor (only for devices that support this feature). name: Power humidity_setpoint: # Optional. Indoor humidity sensor (only for devices that support this feature). name: Humidity
id (Optional, ID): Manually specify the ID used for code generation.
name (Required, string): The name of the climate device.
period (Optional, time): Minimal period between requests to the appliance. Defaults to
timeout (Optional, time): Request response timeout until next request attempt. Defaults to
num_attempts (Optional, integer 1-5): Number of request attempts. Defaults to
autoconf (Optional, boolean): Get capabilities automatically. Allows you not to manually define most of the capabilities of the appliance. Defaults to
beeper (Optional, boolean): Beeper feedback on command. Defaults to
supported_modes (Optional, list): List of supported modes. Possible values are:
custom_fan_modes (Optional, list): List of supported custom fan modes. Possible values are:
supported_presets (Optional, list): List of supported presets. Possible values are:
custom_presets (Optional, list): List of supported custom presets. Possible values are:
supported_swing_modes (Optional, list): List of supported swing modes. Possible values are:
outdoor_temperature (Optional): The information for the outdoor temperature sensor.
power_usage (Optional): The information for the current power consumption sensor.
humidity_setpoint (Optional): The information for the humidity indoor sensor (experimental).
All other options from Climate.
This action turn on power. The mode and preset will be restored to the last state before turned off.
on_...: then: - midea_ac.power_on:
This action turn off power.
on_...: then: - midea_ac.power_off:
This action transmit IR FollowMe command telling the air conditioner a more accurate room temperature value to be used instead of the internal indoor unit sensor.
on_...: then: - midea_ac.follow_me: temperature: !lambda "return x;" beeper: false
This action toggle ac screen. Works via UART if supported or Remote Transmitter.
on_...: then: - midea_ac.display_toggle:
This action adjust the louver by one step. Remote Transmitter required.
on_...: then: - midea_ac.swing_step:
This action turn on beeper feedback.
on_...: then: - midea_ac.beeper_on:
This action turn off beeper feedback.
on_...: then: - midea_ac.beeper_off:
Additional control options using IR commands¶
It is possible to use the FollowMe function and some other features available only through IR commands. Below is an example of how to send FollowMe commands with the values of your sensor using the Remote Transmitter component, as well as control the light of the LED display.
# Example configuration entry remote_transmitter: pin: GPIO13 # For iot-uni-stick. carrier_duty_percent: 100% # 50% for IR LED, 100% for direct connect to TSOP IR receiver output. sensor: - platform: homeassistant entity_id: sensor.room_sensor # Sensor from HASS internal: true filters: - throttle: 10s - heartbeat: 2min # Maximum interval between updates. - debounce: 1s on_value: midea_ac.follow_me: temperature: !lambda "return x;" beeper: false # Optional. Beep on update. # template momentary switches for sending display control command and swing step actions switch: - platform: template name: Display Toggle icon: mdi:theme-light-dark turn_on_action: midea_ac.display_toggle: - platform: template name: Swing Step icon: mdi:tailwind turn_on_action: midea_ac.swing_step:
Example of Beeper Control Using a Switch¶
switch: - platform: template name: Beeper icon: mdi:volume-source optimistic: true turn_on_action: midea_ac.beeper_on: turn_off_action: midea_ac.beeper_off:
Thanks to the following people for their contributions to reverse engineering the UART protocol and source code in the following repositories:
Special thanks to the project IRremoteESP8266 for describing the IR protocol.