### Customization JSON Example Source: https://github.com/wuwentao/midea_ac_lan/blob/master/README.md Provides an example of how to format multiple customization items for a Midea AC LAN device. The structure must be valid JSON, allowing for settings like 'refresh_interval' and 'fan_speed'. ```json { "refresh_interval": 15, "fan_speed": 100 } ``` -------------------------------- ### Install Midea AC LAN using Shell Script Source: https://github.com/wuwentao/midea_ac_lan/blob/master/README.md This script downloads and executes the installation for Midea AC LAN. It is intended to be run in a Home Assistant Terminal or SSH add-on. Ensure you have the necessary permissions to execute shell scripts. ```shell wget -O - https://github.com/wuwentao/midea_ac_lan/raw/master/scripts/install.sh | ARCHIVE_TAG=latest bash - ``` -------------------------------- ### Example Dehumidifier Custom Configuration (JSON) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/A1.md An example JSON configuration for customizing a specific Midea dehumidifier model. This snippet demonstrates how to override default fan speeds and modes with custom values. It is intended as a starting point for users with similar devices. ```json { "speeds": { "40": "Low", "80": "High" }, "modes": { "1": "Manual", "2": "Continuous", "4": "Max" } } ``` -------------------------------- ### Set Appliance Attribute (YAML) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/40.md This YAML example demonstrates how to use the 'midea_ac_lan.set_attribute' service to control appliance features. It shows setting the 'light' attribute to 'true' for a specific device. This service is used to toggle on/off features or set specific values. ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: light value: true ``` -------------------------------- ### Discover Device Type and SN using midealocal CLI (Python) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/debug.md This command utilizes the `midealocal` Python package to discover Midea air conditioning devices on the network, retrieve their serial numbers, and identify their types. It requires the IP address of the device as input and outputs device details including type, SN, and protocol. Ensure `midealocal` is installed and accessible within your Home Assistant Core environment. ```shell python3 -m midealocal.cli discover --get_sn --host 192.168.2.127 ``` -------------------------------- ### Set Midea AC Attribute - YAML Example Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/AC.md This YAML snippet demonstrates how to use the `midea_ac_lan.set_attribute` service to change an attribute on a Midea air conditioner. It requires the device ID, the attribute name, and the desired value. Supported attributes include power, eco_mode, fan_speed, and more. ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: eco_mode value: true ``` ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: fan_speed value: auto ``` -------------------------------- ### Set Appliance Attribute Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/DB.md Allows setting specific attributes for a Midea appliance, such as power state or start command. ```APIDOC ## POST /api/services/midea_ac_lan/set_attribute ### Description Set the attribute of appliance. This service allows you to control specific features of your Midea device. ### Method POST ### Endpoint /api/services/midea_ac_lan/set_attribute ### Parameters #### Request Body - **device_id** (string) - Required - The Appliance code (Device ID) of the appliance. - **attribute** (string) - Required - The attribute to set. Possible values: "power", "start". - **value** (boolean) - Required - The desired value for the attribute (true or false). ### Request Example ```json { "device_id": "XXXXXXXXXXXX", "attribute": "power", "value": true } ``` ### Response #### Success Response (200) An empty object or a success indicator is typically returned upon successful execution. #### Response Example ```json { "success": true } ``` ``` -------------------------------- ### Midea AC LAN Set Attribute Service Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/DA.md Allows setting attributes for Midea appliances, such as power and start status. ```APIDOC ## POST /services/midea_ac_lan/set_attribute ### Description Sets a specific attribute for a Midea appliance. ### Method POST ### Endpoint /services/midea_ac_lan/set_attribute ### Parameters #### Request Body - **device_id** (string) - Required - The Appliance code (Device ID) of the appliance. - **attribute** (string) - Required - The attribute to set. Accepted values: "power", "start". - **value** (boolean) - Required - The desired value for the attribute (true or false). ### Request Example ```json { "device_id": "XXXXXXXXXXXX", "attribute": "power", "value": true } ``` ### Response #### Success Response (200) This service does not return a specific response body on success, indicating the attribute was set. #### Response Example (No specific response body on success) ``` -------------------------------- ### Set Fan Direction (YAML) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/40.md This YAML example illustrates using the 'midea_ac_lan.set_attribute' service to control the fan's direction. It shows setting the 'directions' attribute to a specific value, such as '100' (degrees). Other valid values include 60, 70, 80, 90, and 'Oscillate'. ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: directions value: 100 ``` -------------------------------- ### Midea AC LAN - Set Attribute Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/DC.md Allows setting attributes for a Midea appliance, such as power and start commands. This is useful for remotely controlling the device. ```APIDOC ## POST /api/midea_ac_lan/set_attribute ### Description Set the attribute of appliance. ### Method POST ### Endpoint /api/midea_ac_lan/set_attribute ### Parameters #### Request Body - **device_id** (string) - Required - The Appliance code (Device ID) of appliance - **attribute** (string) - Required - The attribute to set. Possible values: "power", "start" - **value** (boolean) - Required - The value to set for the attribute (true or false) ### Request Example ```json { "device_id": "XXXXXXXXXXXX", "attribute": "power", "value": true } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "ok" } ``` ``` -------------------------------- ### Download Midea AC LAN Source Code File (wget) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/debug.md This command uses `wget` to download a specific raw file from a GitHub repository, useful for manually updating source code for testing. The `-O` flag overwrites the existing file with the downloaded content. This is typically used within an SSH session on the Home Assistant device. ```bash wget https://github.com/wuwentao/midea_ac_lan/raw/xxxx/custom_components/midea_ac_lan/light.py -O light.py ``` -------------------------------- ### Enable Midea AC LAN Debug Logging in configuration.yaml Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/debug.md This method involves editing the Home Assistant `configuration.yaml` file to enable debug logging for the `midea_ac_lan` and `midealocal` components. It requires a Home Assistant restart to apply the changes and is the recommended approach for capturing startup errors. The output is written to the HA logs. ```yaml logger: default: warn logs: custom_components.midea_ac_lan: debug midealocal: debug ``` -------------------------------- ### Download Midea Local Source Code File (wget) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/debug.md This command uses `wget` to download a specific raw file from the `midea-local` GitHub repository, intended for manually updating the `midealocal` Python package source code. The `-O` flag ensures the downloaded file overwrites the existing one. This command is executed within the HA Core Docker container. ```bash wget https://github.com/midea-lan/midea-local/raw/xxxx/midealocal/devices/cd/message.py -O devices/cd/message.py ``` -------------------------------- ### Enable Midea AC LAN Debug Logging via Action Call Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/debug.md This method allows enabling debug logging for `midea_ac_lan` and `midealocal` components directly through the Home Assistant UI's Developer Tools without requiring a restart. However, it cannot capture logs from the device startup process. The changes are temporary and reset on restart. ```yaml action: logger.set_level data: custom_components.midea_ac_lan: debug midealocal: debug ``` -------------------------------- ### Extra Entities Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/C3.md This section lists the available binary_sensor, sensor, and switch entities for Midea AC devices. ```APIDOC ## Extra Entities This section lists the available entities for Midea AC devices. ### Binary Sensors - `binary_sensor.{DEVICEID}_zone1_water_temp_mode`: Zone1 Water Temperature Mode - `binary_sensor.{DEVICEID}_zone2_water_temp_mode`: Zone2 Water Temperature Mode - `binary_sensor.{DEVICEID}_zone1_room_temp_mode`: Zone1 Room Temperature Mode - `binary_sensor.{DEVICEID}_zone2_room_temp_mode`: Zone2 Room Temperature Mode - `binary_sensor.{DEVICEID}_status_dhw`: DHW Status - `binary_sensor.{DEVICEID}_status_tbh`: TBH Status - `binary_sensor.{DEVICEID}_status_ibh`: IBH Status - `binary_sensor.{DEVICEID}_status_heating`: Heating Status ### Sensors - `sensor.{DEVICEID}_error_code`: Error Code - `sensor.{DEVICEID}_tank_actual_temperature`: Tank Actual Temperature - `sensor.{DEVICEID}_total_energy_consumption`: Total Energy Consumption. The first value may be delayed because updates are only sent when the device is active. - `sensor.{DEVICEID}_total_produced_energy`: Total Produced Energy - `sensor.{DEVICEID}_outdoor_temperature`: Outdoor Temperature ### Switches - `switch.{DEVICEID}_disinfect`: Disinfect - `switch.{DEVICEID}_dhw_power`: DHW Power - `switch.{DEVICEID}_eco_mode`: ECO Mode - `switch.{DEVICEID}_fast_dhw`: Fast DHW - `switch.{DEVICEID}_silent_mode`: Silent Mode - `switch.{DEVICEID}_silent_level`: Silent Level (Select) - `switch.{DEVICEID}_tbh`: TBH - `switch.{DEVICEID}_zone1_curve`: Zone1 Curve - `switch.{DEVICEID}_zone2_curve`: Zone2 Curve - `switch.{DEVICEID}_zone1_power`: Zone1 Power - `switch.{DEVICEID}_zone2_power`: Zone2 Power ``` -------------------------------- ### Display Midea AC LAN Device JSON Configuration (cat) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/debug.md This command displays the content of a specific device's JSON configuration file stored within Home Assistant's `.storage/midea_ac_lan` directory. This file is used by the `midea_ac_lan` integration to manage added devices and prevent duplicates. The `xxx` placeholder represents the device ID. ```bash cat xxx.json ``` -------------------------------- ### Call midea_ac_lan.set_attribute Service (YAML) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E6.md This service is used to set various attributes of a Midea appliance, such as main power or heating power. It requires the device ID, the attribute to set, and the desired value (true/false). ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: main_power value: true ``` -------------------------------- ### Midea AC LAN Dishwasher Entities Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E1.md This section details the available entities for a Midea Dishwasher, including their IDs, classes, and descriptions. ```APIDOC ## Midea AC LAN Dishwasher Entities ### Default Entity No default entity ### Extra Entities | EntityID | Class | Description | | ------------------------------------ | ------------- | ---------------------- | | binary_sensor.{DEVICEID}_door | binary_sensor | Door | | binary_sensor.{DEVICEID}_rinse_aid | binary_sensor | Rinse Aid Shortage | | binary_sensor.{DEVICEID}_salt | binary_sensor | Salt Shortage | | sensor.{DEVICEID}_humidity | sensor | Humidity | | sensor.{DEVICEID}_progress | sensor | Progress | | sensor.{DEVICEID}_status | sensor | Status | | sensor.{DEVICEID}_storage_remaining | sensor | Storage Time Remaining | | sensor.{DEVICEID}_temperature | sensor | Temperature | | sensor.{DEVICEID}_time_remaining | sensor | Time Remaining | | sensor.{DEVICEID}_mode | sensor | Mode | | sensor.{DEVICEID}_error_code | sensor | Error Code | | sensor.{DEVICEID}_softwater | sensor | Softwater Level | | sensor.{DEVICEID}_bright | sensor | Bright Level | | lock.{DEVICEID}_child_lock | lock | Child Lock | | switch.{DEVICEID}_power | switch | Power | | switch.{DEVICEID}_storage | switch | Storage | ``` -------------------------------- ### Customize Electric Water Heater Settings Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E2.md Allows customization of the electric water heater's behavior, including protocol version, temperature precision, and temperature step. ```APIDOC ## PUT /api/config/midea_ac_lan/customize ### Description Customize settings for the Electric Water Heater. ### Method PUT ### Endpoint /api/config/midea_ac_lan/customize ### Parameters #### Request Body - **old_protocol** (boolean) - Optional - Set the protocol version ('true' for old protocol, 'false' for new protocol, 'auto' defaults to false). - **precision_halves** (boolean) - Optional - Set the temperature precision for whole or halves (false for whole and true for halves, default by false). - **temperature_step** (number) - Optional - Set the temperature step (1 by default). ### Request Example ```json { "old_protocol": true, "precision_halves": true, "temperature_step": 0.5 } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Set Midea AC LAN Attribute (YAML) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/26.md This code snippet demonstrates how to use the `midea_ac_lan.set_attribute` service in YAML to control various attributes of a Midea appliance. It covers setting boolean attributes like `main_light` and `night_light`, discrete choices like `mode`, and numerical or string values for `direction`. Ensure you replace 'XXXXXXXXXXXX' with your actual device ID. ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: main_light value: true ``` ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: mode value: Bath ``` ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: direction value: 70 ``` -------------------------------- ### midea_ac_lan.set_attribute Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/C3.md Allows setting various attributes for a Midea air conditioner. ```APIDOC ## midea_ac_lan.set_attribute ### Description Set the attribute of appliance. ### Method Call Service ### Endpoint N/A (Service Call) ### Parameters #### Service Data - **device_id** (string) - Required - The Appliance code (Device ID) of appliance - **attribute** (string) - Required - The attribute to set. Can be one of: "disinfect", "dhw_power", "fast_dhw", "zone1_curve", "zone2_curve", "zone1_power", "zone2_power" - **value** (boolean) - Required - The value to set for the attribute (true or false) ### Request Example ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: zone1_curve value: true ``` ### Response #### Success Response (Service calls typically do not have a direct response body in this format; success is indicated by the absence of errors) #### Response Example N/A ``` -------------------------------- ### Set Midea AC Attribute using YAML Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/C3.md This snippet demonstrates how to call the `midea_ac_lan.set_attribute` service using YAML in Home Assistant. It requires the `device_id`, the `attribute` to change (e.g., 'zone1_curve'), and the `value` (true/false) to set. This is a common method for automating appliance control. ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: zone1_curve value: true ``` -------------------------------- ### Customize Gas Boiler Temperature Step Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E6.md Allows customization of the temperature step for the gas boiler. The default step is 0.5. ```APIDOC ## POST /api/customize/temperature_step ### Description Sets the temperature step for the gas boiler. The default value is 0.5. ### Method POST ### Endpoint /api/customize/temperature_step ### Parameters #### Request Body - **temperature_step** (integer) - Optional - The desired temperature step value. ### Request Example ```json { "temperature_step": 1 } ``` ### Response #### Success Response (200) Returns a success message indicating the temperature step has been updated. #### Response Example ```json { "message": "Temperature step updated successfully" } ``` ``` -------------------------------- ### Customize Temperature Precision Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/40.md Allows setting the temperature precision for display. Can be set to true for halves or false for whole degrees. ```APIDOC ## CUSTOMIZE TEMPERATURE PRECISION ### Description Set the temperature precision for whole or halves (false for whole and true for halves, default by false). If the temperature value displayed is twice the actual value, please set this value to true. ### Method ``` POST ``` ### Endpoint ``` /customize ``` ### Request Body #### Request Body - **precision_halves** (boolean) - Optional - If true, temperature will be displayed in halves. Defaults to false. ### Request Example ```json { "precision_halves": true } ``` ### Response No specific success response defined for this customization. ``` -------------------------------- ### Set Appliance Attribute via Service (YAML) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E3.md This service allows setting various attributes of the Midea appliance. It requires the device ID and the attribute to be set, along with its new value. Supported attributes include energy saving, power, smart volume, and zero cold water options. ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: smart_volume value: true ``` -------------------------------- ### Customize Temperature Precision (JSON) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/40.md This JSON configuration snippet allows customization of temperature precision. Setting 'precision_halves' to true enables display of temperature in halves (e.g., 23.5), while false (default) displays whole numbers. This is useful when the displayed temperature is twice the actual value. ```json { "precision_halves": true } ``` -------------------------------- ### Toilet Customization API Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/C2.md This section details how to customize various settings for the toilet appliance, such as dry level, water temperature, and seat temperature. ```APIDOC ## POST /api/toilet/customize ### Description Allows customization of toilet settings like maximum dry level, water temperature level, and seat temperature level. ### Method POST ### Endpoint /api/toilet/customize ### Parameters #### Request Body - **max_dry_level** (integer) - Optional - The maximum level for the dry function, defaults to 3. - **max_water_temp_level** (integer) - Optional - The maximum level for water temperature, defaults to 5. - **max_seat_temp_level** (integer) - Optional - The maximum level for seat temperature, defaults to 5. ### Request Example ```json { "max_dry_level": 3, "max_water_temp_level": 5, "max_seat_temp_level": 5 } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Customize Electric Water Heater Protocol Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E2.md Allows setting the communication protocol for the electric water heater. Useful if the default 'auto' setting does not work. Supports 'old protocol' and 'new protocol'. ```json { "old_protocol": true } ``` -------------------------------- ### midea_ac_lan.set_attribute Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/34.md Allows setting various attributes for the sink dishwasher, such as power, child lock, and storage. ```APIDOC ## midea_ac_lan.set_attribute ### Description Sets the attribute of a Midea appliance. This service is used to control specific features of the sink dishwasher. ### Method Call Service ### Endpoint N/A (Service Call) ### Parameters #### Service Data - **device_id** (string) - Required - The Appliance code (Device ID) of the appliance. - **attribute** (string) - Required - The attribute to set. Possible values: "child_lock", "power", "storage". - **value** (boolean) - Required - The value to set for the attribute (true or false). ### Request Example ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: power value: true ``` ### Response #### Success Response (200) This service does not return specific data on success, but the appliance state will be updated. #### Response Example N/A ``` -------------------------------- ### Midea AC LAN Set Attribute Service Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E6.md This service allows you to set various attributes for the gas boiler appliance, such as main power and heating power. ```APIDOC ## POST /api/services/midea_ac_lan/set_attribute ### Description Sets a specified attribute for the Midea gas boiler appliance. This service can control main power, heating power, and other parameters. ### Method POST ### Endpoint /api/services/midea_ac_lan/set_attribute ### Parameters #### Request Body - **device_id** (string) - Required - The Appliance code (Device ID) of the appliance. - **attribute** (string) - Required - The attribute to set. Possible values: "main_power", "heating_power". - **value** (boolean) - Required - The desired value for the attribute (true or false). ### Request Example ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: main_power value: true ``` ### Response #### Success Response (200) Returns a success message indicating the attribute has been updated. #### Response Example ```json { "message": "Attribute updated successfully" } ``` ``` -------------------------------- ### Set Midea AC Attribute via Service Call (YAML) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/CC.md This YAML snippet demonstrates how to call the `midea_ac_lan.set_attribute` service to control a Midea air conditioner. It requires the device ID, the attribute to change (e.g., 'eco_mode'), and the desired boolean value. ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: eco_mode value: true ``` -------------------------------- ### midea_ac_lan.set_attribute Service Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E1.md Allows setting specific attributes of the Midea dishwasher appliance. ```APIDOC ## midea_ac_lan.set_attribute ### Description Set the attribute of appliance. ### Method POST ### Endpoint `/api/services/midea_ac_lan/set_attribute` ### Parameters #### Request Body - **device_id** (string) - Required - The Appliance code (Device ID) of appliance - **attribute** (string) - Required - The attribute to set. Can be "child_lock", "power", or "storage". - **value** (boolean) - Required - The desired value for the attribute (true or false). ### Request Example ```json { "device_id": "XXXXXXXXXXXX", "attribute": "power", "value": true } ``` ### Response #### Success Response (200) This service typically returns an empty JSON object `{}` upon successful execution. #### Response Example ```json {} ``` ``` -------------------------------- ### midea_ac_lan.set_attribute Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E3.md Allows setting various attributes for the gas water heater, such as power, smart volume, and energy saving modes. ```APIDOC ## midea_ac_lan.set_attribute ### Description Set the attribute of appliance. This service allows you to control various aspects of the gas water heater. ### Method POST ### Endpoint /api/services/midea_ac_lan/set_attribute ### Parameters #### Request Body - **device_id** (string) - Required - The Appliance code (Device ID) of the appliance. - **attribute** (string) - Required - The attribute to set. Possible values: "energy_saving", "power", "smart_volume", "zero_cold_water", "zero_cold_pulse". - **value** (boolean) - Required - The value to set for the attribute (true or false). ### Request Example ```json { "service": "midea_ac_lan.set_attribute", "data": { "device_id": "XXXXXXXXXXXX", "attribute": "smart_volume", "value": true } } ``` ### Response #### Success Response (200) This service typically returns an empty JSON object on success, or a service response indicating the status of the service call. #### Response Example ```json { "result": null } ``` ``` -------------------------------- ### Set Gas Boiler Temperature Step (JSON) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E6.md Allows customization of the temperature step for gas boilers. The default value is 0.5. This JSON object can be used to override the default setting. ```json { "temperature_step": 1 } ``` -------------------------------- ### Customize Temperature Step Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E3.md Adjust the temperature step for controlling the water heater, with a default step of 1. ```APIDOC ## Customize Temperature Step ### Description Set the temperature step for the water heater. The default value is 1. ### Method POST ### Endpoint /api/services/midea_ac_lan.set_device_attribute ### Parameters #### Request Body - **device_id** (string) - Required - The Appliance code (Device ID) of the water heater. - **temperature_step** (number) - Required - The desired temperature step (e.g., 0.5, 1). ### Request Example ```json { "service": "midea_ac_lan.set_device_attribute", "data": { "device_id": "XXXXXXXXXXXX", "temperature_step": 0.5 } } ``` ### Response #### Success Response (200) An empty JSON object or a service response indicating success. #### Response Example ```json { "result": null } ``` ``` -------------------------------- ### Set Toilet Attributes using midea_ac_lan.set_attribute Service Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/C2.md This YAML service call is used to control various attributes of the Midea AC LAN toilet. It requires the device ID and the specific attribute to be set, along with its desired value. This service can toggle features like child lock, power, sensor light, and foam shield, or adjust levels for drying and temperature. ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: child_lock value: true ``` ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: max_dry_level value: 2 ``` -------------------------------- ### Set Dishwasher Attribute using midea_ac_lan.set_attribute (YAML) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/34.md This service allows you to set specific attributes of a Midea appliance, such as power or child lock status. It requires the device ID, the attribute to modify, and the desired value (true/false). ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: power value: true ``` -------------------------------- ### midea_ac_lan.set_attribute Service Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/40.md Sets a specific attribute of the appliance. Supports attributes like light, ventilation, smelly_sensor, and directions. ```APIDOC ## midea_ac_lan.set_attribute ### Description Set the attribute of appliance. This service allows controlling various features of the ceiling fan. ### Method ``` POST ``` ### Endpoint ``` /services/midea_ac_lan/set_attribute ``` ### Parameters #### Request Body - **device_id** (string) - Required - The Appliance code (Device ID) of the appliance. - **attribute** (string) - Required - The attribute to set. Can be "light", "ventilation", "smelly_sensor", or "directions". - **value** (boolean or number) - Required - The value to set for the attribute. For 'light', 'ventilation', 'smelly_sensor', use true or false. For 'directions', use 60, 70, 80, 90, 100, or "Oscillate". ### Request Example #### Light Control ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: light value: true ``` #### Direction Control ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: directions value: 100 ``` ### Response #### Success Response (200) - **message** (string) - Confirmation of the attribute being set. #### Response Example ```json { "message": "Attribute 'light' set to true for device XXXXXXXXXXXX" } ``` ``` -------------------------------- ### midea_ac_lan.set_attribute Service Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/C2.md This service allows setting various attributes for Midea AC devices, including child lock, power, sensor light, foam shield, dry level, water temperature level, and seat temperature level. ```APIDOC ## POST /api/services/midea_ac_lan/set_attribute ### Description Sets a specific attribute of a Midea AC appliance. This service can control features like child lock, power, lighting, and temperature settings. ### Method POST ### Endpoint /api/services/midea_ac_lan/set_attribute ### Parameters #### Request Body - **device_id** (string) - Required - The unique identifier for the appliance. - **attribute** (string) - Required - The attribute to set. Accepted values include "child_lock", "power", "sensor_light", "foam_shield", "dry_level", "water_temp_level", "seat_temp_level". - **value** (any) - Required - The value to set for the attribute. For boolean attributes (child_lock, power, etc.), use `true` or `false`. For level-based attributes (dry_level, water_temp_level, seat_temp_level), use an integer from 0 to the maximum level. ### Request Example ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: child_lock value: true ``` ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: max_dry_level value: 2 ``` ### Response #### Success Response (200) - **result** (boolean) - Indicates whether the attribute was set successfully. #### Response Example ```json { "result": true } ``` ``` -------------------------------- ### Dehumidifier Mode Configuration (JSON) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/A1.md Specifies the mapping between internal device codes and user-friendly names for dehumidifier operational modes. This JSON structure allows customization of mode labels displayed in Home Assistant. Default modes are applied if this setting is omitted. ```json { "modes": { "1": "Manual", "2": "Continuous", "3": "Auto", "4": "Clothes-Dry", "5": "Shoes-Dry" } } ``` -------------------------------- ### Set Midea AC LAN Device Attribute (YAML) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/FB.md This service call allows you to set various attributes of a Midea appliance. You need to provide the device ID, the attribute name (e.g., 'power', 'child_lock', 'heating_level'), and the desired value. The available attributes and their valid values depend on the specific device. ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: power value: true ``` ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: heating_level value: 9 ``` -------------------------------- ### Set Power Consumption Analysis Method for Midea AC Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/AC.md This JSON snippet shows how to configure the power consumption analysis method for a Midea air conditioner. There are three methods available (1, 2, and 3), and the appropriate one should be selected if the power consumption data appears incorrect. This setting helps ensure accurate energy usage monitoring. ```json { "power_analysis_method": 2 } ``` -------------------------------- ### Dehumidifier Fan Speed Configuration (JSON) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/A1.md Defines the mapping between internal device codes and user-friendly names for dehumidifier fan speeds. This JSON structure is used to customize the fan speed options available in Home Assistant. If not provided, a default set of speeds is used. ```json { "speeds": { "1": "Lowest", "40": "Low", "60": "Medium", "80": "High", "102": "Auto", "127": "Off" } } ``` -------------------------------- ### Customize Temperature Precision Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E3.md Configure the temperature precision displayed by the water heater. Use this if the displayed temperature is twice the actual value. ```APIDOC ## Customize Temperature Precision ### Description Set the temperature precision for whole or halves. Set to `true` for halves, `false` for whole degrees (default). ### Method POST ### Endpoint /api/services/midea_ac_lan.set_device_attribute ### Parameters #### Request Body - **device_id** (string) - Required - The Appliance code (Device ID) of the water heater. - **precision_halves** (boolean) - Required - `true` to display temperature in halves, `false` for whole degrees. ### Request Example ```json { "service": "midea_ac_lan.set_device_attribute", "data": { "device_id": "XXXXXXXXXXXX", "precision_halves": true } } ``` ### Response #### Success Response (200) An empty JSON object or a service response indicating success. #### Response Example ```json { "result": null } ``` ``` -------------------------------- ### Heat Pump Water Heater Customization Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/CD.md Endpoints for customizing the behavior of the Heat Pump Water Heater, such as setting temperature steps or switching between temperature units. ```APIDOC ## PUT /api/devices/{DEVICEID}/water_heater/customize ### Description Allows customization of the Heat Pump Water Heater's settings, including temperature step and unit conversion. ### Method PUT ### Endpoint /api/devices/{DEVICEID}/water_heater/customize ### Parameters #### Path Parameters - **DEVICEID** (string) - Required - The unique identifier for the water heater device. #### Request Body - **temperature_step** (number) - Optional - The step size for temperature adjustments (defaults to 1.0). - **lua_protocol** (string) - Optional - Specifies the protocol for temperature unit conversion. Accepted values: 'old', 'new', 'auto' (default). ### Request Example ```json { "temperature_step": 0.5, "lua_protocol": "new" } ``` ### Response #### Success Response (200) Indicates that the customization settings were applied successfully. #### Response Example ```json { "message": "Water heater customization updated" } ``` ``` -------------------------------- ### midea_ac_lan.set_attribute Service Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/CC.md This service allows you to set various attributes of the Midea AC appliance. You can control features like auxiliary heating, ECO mode, night light, power, sleep mode, and swing. ```APIDOC ## POST /api/services/midea_ac_lan/set_attribute ### Description Set the attribute of appliance. This service allows you to control various aspects of your Midea air conditioner. ### Method POST ### Endpoint /api/services/midea_ac_lan/set_attribute ### Parameters #### Request Body - **device_id** (string) - Required - The Appliance code (Device ID) of the appliance. - **attribute** (string) - Required - The attribute to set. Supported values: "aux_heating", "eco_mode", "night_light", "power", "sleep_mode", "swing". - **value** (boolean) - Required - The desired value for the attribute (true or false). ### Request Example ```json { "device_id": "XXXXXXXXXXXX", "attribute": "eco_mode", "value": true } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the attribute was set successfully. #### Response Example ```json { "message": "Attribute eco_mode set to true for device XXXXXXXXXXXX" } ``` ``` -------------------------------- ### Configure Toilet Customization Options Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/C2.md This JSON object defines the maximum levels for various toilet features. It is used to set the default or maximum operational parameters for the toilet's functions such as drying, water temperature, and seat temperature. ```json { "max_dry_level": 3, "max_water_temp_level": 5, "max_seat_temp_level": 5 } ``` -------------------------------- ### Range Hood Fan Speed Configuration (JSON) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/B6.md Defines the available fan speeds for a range hood device, including 'Off', specific levels, and 'Variable' settings. It also specifies the default fan speed to be used when the device powers on. This configuration might vary across different range hood models. ```json { "speeds": { "0": "Off", "1": "Level 1", "2": "Level 2", "3": "Level 3", "22": "Variable" }, "default_speed": 2 } ``` -------------------------------- ### Set Midea AC Attribute using midea_ac_lan.set_attribute Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/CF.md This service allows you to set specific attributes of a Midea air conditioner, such as auxiliary heating or power state. It requires the device ID, the attribute name, and the desired boolean value. Ensure the device ID is correct and the attribute is supported by your appliance. ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: aux_heating value: true ``` -------------------------------- ### midea_ac_lan.set_attribute Service Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/CE.md This service allows you to set specific attributes for the Midea Fresh Air Appliance. ```APIDOC ## midea_ac_lan.set_attribute ### Description Set the attribute of appliance. Supports attributes like child_lock, aux_heating, eco_mode, link_to_ac, power, powerful_purify, and sleep_mode. ### Method POST ### Endpoint /api/services/midea_ac_lan/set_attribute ### Parameters #### Request Body - **device_id** (string) - Required - The Appliance code (Device ID) of the appliance. - **attribute** (string) - Required - The attribute to set. Possible values: "child_lock", "aux_heating", "eco_mode", "link_to_ac", "power", "powerful_purify", "sleep_mode". - **value** (boolean) - Required - The value to set for the attribute (true or false). ### Request Example ```json { "device_id": "XXXXXXXXXXXX", "attribute": "power", "value": true } ``` ### Response #### Success Response (200) An empty response is typically returned on success. #### Response Example ```json {} ``` ``` -------------------------------- ### Midea AC LAN Washer Entities Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/DA.md Provides access to various sensor and switch entities for Midea Top Load Washers. ```APIDOC ## Entities for Top Load Washer ### Description These entities represent different states and controls for the Midea Top Load Washer. ### Entities - **sensor.{DEVICEID}_progress** (sensor) - Represents the current progress of the washing cycle. - **sensor.{DEVICEID}_time_remaining** (sensor) - Represents the estimated time remaining for the washing cycle. - **switch.{DEVICEID}_power** (switch) - Controls the power state of the appliance. - **switch.{DEVICEID}_start** (switch) - Controls the start/pause state of the appliance. ``` -------------------------------- ### midea_ac_lan.set_attribute Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/AC.md This service allows you to set specific attributes of a Midea air conditioner, such as power state, operating mode, fan speed, and swing direction. ```APIDOC ## midea_ac_lan.set_attribute ### Description Sets a specific attribute of a Midea air conditioner. ### Method Call Service ### Endpoint Not Applicable (Service Call) ### Parameters #### Service Data - **device_id** (string) - Required - The Appliance code (Device ID) of the appliance. - **attribute** (string) - Required - The attribute to set. Possible values include: - "aux_heating" - "breezeless" - "comfort_mode" - "dry" - "eco_mode" - "indirect_wind" - "natural_wind" - "prompt_tone" - "power" - "screen_display" - "screen_display_2" - "smart_eye" - "swing_horizontal" - "swing_vertical" - "turbo_mode" - "fan_speed" - **value** (boolean or string) - Required - The value to set for the attribute. - For most attributes, this is `true` or `false`. - For `fan_speed`, this can be a range from 1 to 100 or the string "auto". ### Request Example ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: eco_mode value: true ``` ```yaml service: midea_ac_lan.set_attribute data: device_id: XXXXXXXXXXXX attribute: fan_speed value: auto ``` ### Response #### Success Response (200) No specific response body is detailed, but the service call is expected to succeed if the parameters are valid and the device is reachable. #### Response Example (Not provided in source) ``` -------------------------------- ### Switch Temperature Units (Fahrenheit/Celsius) Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/CD.md Enables switching between Fahrenheit and Celsius temperature units. If errors occur, the `lua_protocol` can be manually set to 'old', 'new', or 'auto' to resolve them. 'auto' is the default. ```json { "lua_protocol": "new" } ``` -------------------------------- ### Midea AC LAN - Set Attribute Service Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/CF.md Allows setting specific attributes for Midea AC devices, such as auxiliary heating and power state. ```APIDOC ## POST /api/services/midea_ac_lan/set_attribute ### Description Set the attribute of appliance. This service allows you to control features like auxiliary heating and power state for your Midea air conditioner. ### Method POST ### Endpoint /api/services/midea_ac_lan/set_attribute ### Parameters #### Query Parameters None #### Request Body - **device_id** (string) - Required - The Appliance code (Device ID) of the appliance. - **attribute** (string) - Required - The attribute to set. Accepted values: "aux_heating", "power". - **value** (boolean) - Required - The desired value for the attribute (true or false). ### Request Example ```json { "device_id": "XXXXXXXXXXXX", "attribute": "aux_heating", "value": true } ``` ### Response #### Success Response (200) This service does not return a specific JSON response upon success, but the action is performed on the device. #### Response Example (No specific response body for success) ``` -------------------------------- ### Customize Electric Water Heater Temperature Precision Source: https://github.com/wuwentao/midea_ac_lan/blob/master/doc/E2.md Configures the temperature precision for the electric water heater, allowing for whole degrees or halves. Set to true if the displayed temperature is twice the actual value. ```json { "precision_halves": true } ```