GithubHelp home page GithubHelp logo

wuwentao / midea_ac_lan Goto Github PK

View Code? Open in Web Editor NEW
130.0 9.0 6.0 1.61 MB

Auto-configure and then control your Midea M-Smart devices (Air conditioner, Fan, Water heater, Washer, etc) via local area network.

License: MIT License

Python 98.88% Shell 0.51% Dockerfile 0.60%
hacs hacs-integration home-assistant midea air-conditioner air-purifier cooker dehumidifier dishwasher humidifier

midea_ac_lan's Introduction

Midea AC LAN

hacs_badge Stable Super-Linter

English | 简体中文 | Discord Chat

georgezhao2010/midea_ac_lan not update for a long time, we will maintain it now

Control your Midea M-Smart appliances via local area network.

  • Automated device discover and configuration based Home Assistant config flow UI.
  • Extra sensors and switches.
  • Synchronize status with the appliance by long TCP connection in time.

⭐If this component is helpful for you, please star it, it encourages me a lot.

❗Note: Home Assistant 2023.8 or higher required for this integration

Supported brands

ariston beverly bugu
carrier colmo comfee
electrolux invertor littleswan
midea netsu ProBreeze
rotenso toshiba vandelo
wahin

And more.

Supported appliances

Type Name Documents
13 Light 13.md
26 Bathroom Master 26.md
34 Sink Dishwasher 34.md
40 Integrated Ceiling Fan 40.md
A1 Dehumidifier A1.md
AC Air Conditioner AC.md
B0 Microwave Oven B0.md
B1 Electric Oven B1.md
B3 Dish Sterilizer B3.md
B4 Toaster B4.md
B6 Range Hood B6.md
BF Microwave Steam Oven BF.md
C2 Toilet C2.md
C3 Heat Pump Wi-Fi Controller C3.md
CA Refrigerator CA.md
CC MDV Wi-Fi Controller CC.md
CD Heat Pump Water Heater CC.md
CE Fresh Air Appliance CE.md
CF Heat Pump CF.md
DA Top Load Washer DA.md
DB Front Load Washer DB.md
DC Clothes Dryer DC.md
E1 Dishwasher E1.md
E2 Electric Water Heater E2.md
E3 Gas Water Heater E3.md
E6 Gas Stove E6.md
E8 Electric Slow Cooker E8.md
EA Electric Rice Cooker EA.md
EC Electric Pressure Cooker EC.md
ED Water Drinking Appliance ED.md
FA Fan FA.md
FB Electric Heater FB.md
FC Air Purifier FC.md
FD Humidifier FD.md

Installation

Search Midea AC LAN in HACS not available now, it will be ready later

Please use manual install as below:

Option 1:

  1. make sure you have installed HACS to Home Assistant HACS install guide
  2. open HACS, click [Custom repositories], Repository input: https://github.com/wuwentao/midea_ac_lan, Category select [Integration]
  3. Restart Home Assistant.

Option 2:

  1. Download midea_ac_lan.zip from Latest Release
  2. copy midea_ac_lan.zip to /custom_components/midea_ac_lan in Home Assistant.
  3. Restart Home Assistant.

Once it done, open [Settings], [Device & services], [Integrations], [Midea AC Lan], do init config and add all your devices.

Add device

❗Note: First, set a static IP address for your appliance in the router, in case the IP address of the appliance changes after set-up.

After installation, search and add component Midea AC LAN in Home Assistant integrations page.

Or click Configuration

❗Note: During the configuration process, you may be asked to enter your Midea account and password. It's necessary to retrieve appliance information (Token and Key) from Midea cloud server. After all appliances configured, you can remove the Midea account configuration without affecting the use of the appliance.

After the account is configured, Click 'ADD DEVICE' once more to add new device. You could repeat the above action to add multiple devices.

Discover automatically

Using this option, the component could auto-discover and list Midea M-Smart appliances in network or specified IP address, select one and add it in.

You can also use an IP address to search within a specified network, such as 192.168.1.255.

❗Note: Discovery automatically requires your appliances and your Home Assistant must be in the same sub-network. Otherwise, devices may not be auto-discovered. Check this by yourself.

Configure manually

If you already know following information, you could add the appliance manually.

  • Appliance code
  • Appliance type (one of Supported appliances)
  • IP address
  • Port (default 6444)
  • Protocol version
  • Token
  • Key

List all appliances only

Using this option, you can list all discoverable Midea M-Smart devices on the network, along with their IDs, types, SNs, and other information.

❗Note: For certain reasons, not all supported devices may be listed here.

Configure

Configure can be found in Settings -> Devices & Services -> Midea AC LAN -> Devices -> CONFIGURE. You can re-set the IP address when device IP changed. You can also add extra sensor and switch entities or customize your own device.

IP address

Set the IP address of device. You can reset this when your device IP is changed.

Refresh interval

Set the interval for actively refreshing the status of a single device (the unit is second) (30 by default and 0 means not refresh actively) Mostly the status update of Midea devices relies on the active information notification of the device,
in which condition the status update in HA still works normally even if the refresh interval is set to be "0".
This component will also actively query the device status at regular intervals, and the default time is 30 seconds.
Some devices do not have active information notifications when their status changed, so synchronization with the status in HA will be slower.
If you are very concerned about the synchronization speed of the status, you can try to set a shorter status refresh interval.

❗Note: shorter refresh interval may mean more power consumption

Extra sensor and switch entities

After configuration, one of few main entity (e.g. climate entity) may be generated . If you want to make the attributes to extra sensor and switch entities, click CONFIGURE in Midea AC LAN integration card to choose (if your devices supported).

Customize

Some types of device have their own configuration items, if your device does not work properly, you may need to customize it. Refer to the device documentation for specific information.

The format of customizations must be JSON.

If multiple customization items need to be configured, the settings must comply with the JSON format.

Example

{ "refresh_interval": 15, "fan_speed": 100 }

Debug

Turn on the debug log out,config in configuration.yaml

logger:
  default: warn
  logs:
    custom_components.midea_ac_lan: debug
    midealocal: debug

we should enable midea_ac_lan and midealocal

midea_ac_lan's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

midea_ac_lan's Issues

Midea AC Breezeless

Hello! I have Midea Breezeless (AC) and it has really nice feature called: Breezeless. Is there any way to enable it with automations? Pretty new in HA, but I was able to set few pretty good automations, but lack of setting breezeless. It's a attribute on device with the same name with true or false values.

Discussion: keep `midea_ac_lan` or rename to `midea_lan`

Device type and model (or SN)

none

The description of new feature

Hi friends

@rokam @chemelli74 @Necroneco @Qianli-Ma

After some consideration, I think we should discuss with this naming issue at early.

First of all, when we started to maintain midea_ac_lan repo, we were unsure who would help us with this forked repo. We just wanted to fix some bugs and try to continue improve it. Fortunately, we have many members contributing code to this repo now, really thanks for all of us.

I know we still have a lot of mypy/pylint/unit test/code coverage issues that need to be improved,
based on our plan and future goal: to integrate with Home Assistant core and rename to midea_lan when we commit to core, so we should consider the naming issue at early.

As @rokam mentioned in the Discord group, midea_ac_lan also is no only for AC now. it should be rename to midea_lan and using new name for us in future.

There is more issue with current forked repo:

  1. it can't show our contributors list
  2. new PR will default goto the origin upstream repo georgezhao2010/midea_ac_lan, we need to manual select it
  3. we have add more tools like pre-commit/lint rule/mypy/etc, @chemelli74 did most of the work
  4. current repo Issue/PR/Star/commit history still increasing
  5. the most important is : if we want to integrate with core, and rename to midea_lan, we need migrate old midea_ac_lan domain user data to midea_lan doamin, if we do it later, we may lost more repo contributors/commit history.
  6. doc update/bug track/feature request in future

@rokam has finished deattach the core device lib to midea-local repo with pip package, any suggestion and comments?
I'm really sorry for these inconveniences with current forked repo, we should have a plan for it.

  • Solution 1: rename to midea_lan with a new repo
    try to migrate old midea_ac_lan domain user data to new midea_lan doamin, then migrate to new midea_lan repo. we should do it at early, if we directly going to core with midea_lan, we may miss more user data and cause incompatibilities, we should finish most of the migration before we commit, using two domains in HA core may not be approve in code review.

  • Solution 2: do nothing, continue using midea_ac_lan in future and always using fork repo mode, no any changes.

  • Solution 3: continue using midea_ac_lan, but remove current repo and reinit it with latest codes, manual save issue/bug list for future track, PR/commit history/repo star will be miss, start a new repo without fork mode for future.

most of us did so many contributing to current midea_ac_lan repo and our future goal, so please add your comments and suggestion with this naming issue, then we can know where we will go in future.

not use Discord and just using GitHub Issue to discuss it, as most of us not in same timezone, it's a most important changes for us and future plan.

Thanks

Heat pump C3 (water_heater entity) looks different than in version 0.3.22

HA core version

2024.5.5

Integration version

0.4.1

Device type and model

C3 - Heat Pump Wi-Fi Controller 171H120F

Used App

MSmartHome

The description of problem

Hello,

I have just tested version 0.4.1 with my C3 heat pump. I immediately noticed that the water_heater entity looks different compared to version 0.3.22, see attached screenshots. The color gradient for the temperatures is no longer displayed.

0.3.22
0 3 22 4

0.4.1
0 4 1

The logs

No response

> @wuwentao 我遇到的问题是空调跟热水器实体变不可用,删除后重新添加又正常了,但是可能过个1-2天又变成不可用了

          > @wuwentao 我遇到的问题是空调跟热水器实体变不可用,删除后重新添加又正常了,但是可能过个1-2天又变成不可用了

感谢反馈,这个确实比较诡异……
尤其是过1-2天变成不可用,如果变成不可用的话,应该会有log记录,建议直接开启debug log,然后持续观察看看哪里的错误吧,尤其是第一个报错的地方,后续的错误可能是因为第一个错误影响导致的。

另外您的HA版本是否升级了?当前midea_ac_lan的版本等信息,也需要都明确一下,HA版本升级一般不会考虑向前兼容,都需要同步更新和升级。
或者一直维持HA和midea_ac_lan均为老版本不升级。

Originally posted by @wuwentao in #26 (comment)

之前这个issue发现问题了,就是我的路由器重启后,设备的IP地址变了,但是ha中取的还是旧IP地址,导致连接不上
2024-06-20 19:44:58.099 DEBUG (主卧**空调) [custom_components.midea_ac_lan.midea.core.device] [210006724806599] Status update: {'available': False}
2024-06-20 19:44:58.138 DEBUG (客厅**空调) [custom_components.midea_ac_lan.midea.core.device] [208907213175498] Connecting to 192.168.238.109:6444
2024-06-20 19:44:58.145 DEBUG (客厅**空调) [custom_components.midea_ac_lan.midea.core.device] [208907213175498] Connection error
2024-06-20 19:44:58.145 DEBUG (客厅**空调) [custom_components.midea_ac_lan.midea.core.device] [208907213175498] Status update: {'available': False}
难道只能固定设备的IP?

Consider splitting the library into a device specific and a HA specific one

Device type and model (or SN)

n/a

The description of new feature

@rokam already started a repository that contains only the device communication specific code. What's the status of that?
I think it would be beneficial to use that as a package and remove the code from here and only maintain what is specific to HA. What do you think?

Broken config flow `{"message":"Invalid handler specified"}`

HA core version

2024.3.3

Integration version

0.4.1

Device type and model

Air Conditioner 00000Q1B

Used App

MSmartHome

The description of problem

I freshly installed Home Assistant. While I'm trying to install an integration, there is a message:

Config flow could not be loaded: {"message":"Invalid handler specified"}

Screenshot 2024-06-07 at 13 24 28

The logs

2024-06-07 12:58:12.590 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration midea_ac_lan: cannot import name 'ConfigFlowResult' from 'homeassistant.config_entries' (/usr/src/homeassistant/homeassistant/config_entries.py)
2024-06-07 13:24:18.677 ERROR (MainThread) [homeassistant.config_entries] Error occurred loading flow for integration midea_ac_lan: cannot import name 'ConfigFlowResult' from 'homeassistant.config_entries' (/usr/src/homeassistant/homeassistant/config_entries.py)

Energy consumption of AC is always zero

HA core version

2024.6.0

Integration version

0.4.1

Device type and model

Air Conditioner 00000Q1B (44204), Air Conditioner 00000Q15 (44204)

Used App

MSmartHome

The description of problem

I've added extra sensors (Total Energy Consumption, Current Energy Consumption, Realtime Power) to my AC, but it's always zero.

I've also tried all 3 power analysis methods, but no one of them works. I'm not pretty sure I did it correctly. I've just filled the Customize input with JSON like {"power_analysis_method": 2}, but I guess it should work like that.

Can you please help me to debug the issue?

The logs

2024-06-07 13:43:11.514 DEBUG (Guest Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [153931628246889] Sending: {'header': 'aa20ac00000000000303', 'body': '418100ff000000000000000000000000000000000a8b', 'message type': '03', 'body type': '41'}
2024-06-07 13:43:11.521 DEBUG (Iryna’s Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [152832116619840] Sending: {'header': 'aa20ac00000000000303', 'body': '418100ff000000000000000000000000000000000d08', 'message type': '03', 'body type': '41'}
2024-06-07 13:43:11.523 DEBUG (Guest Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [153931628246889] Sending: {'header': 'aa1aac00000000000303', 'body': 'b106420018001500170033024b000b80', 'message type': '03', 'body type': 'b1'}
2024-06-07 13:43:11.524 DEBUG (Iryna’s Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [152832116619840] Sending: {'header': 'aa1aac00000000000303', 'body': 'b106420018001500170033024b000ebf', 'message type': '03', 'body type': 'b1'}
2024-06-07 13:43:11.524 DEBUG (Guest Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [153931628246889] Sending: {'header': 'aa11ac00000000000303', 'body': '41210144000109', 'message type': '03', 'body type': '41'}
2024-06-07 13:43:11.524 DEBUG (Iryna’s Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [152832116619840] Sending: {'header': 'aa11ac00000000000303', 'body': '41210144000109', 'message type': '03', 'body type': '41'}
2024-06-07 13:43:11.543 DEBUG (Semyon’s Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [153931628246689] Sending: {'header': 'aa20ac00000000000303', 'body': '418100ff000000000000000000000000000000001068', 'message type': '03', 'body type': '41'}
2024-06-07 13:43:11.548 DEBUG (Semyon’s Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [153931628246689] Sending: {'header': 'aa1aac00000000000303', 'body': 'b106420018001500170033024b001163', 'message type': '03', 'body type': 'b1'}
2024-06-07 13:43:11.549 DEBUG (Semyon’s Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [153931628246689] Sending: {'header': 'aa11ac00000000000303', 'body': '41210144000109', 'message type': '03', 'body type': '41'}
2024-06-07 13:43:11.662 DEBUG (Guest Bedroom AC) [custom_components.midea_ac_lan.midea.devices.ac.device] [153931628246889] Received: {'header': 'aa28ac00000000000303', 'body': 'c0004b667f7f000000000073ff0f00080000000000000000000000000ad4', 'message type': '03', 'body type': 'c0'}
2024-06-07 13:43:11.662 DEBUG (Guest Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [153931628246889] Status update: {'power': False, 'mode': 2, 'target_temperature': 27.0, 'fan_speed': 102, 'swing_vertical': False, 'swing_horizontal': False, 'smart_eye': False, 'dry': False, 'aux_heating': False, 'boost_mode': False, 'sleep_mode': False, 'frost_protect': False, 'comfort_mode': False, 'eco_mode': False, 'natural_wind': False, 'temp_fahrenheit': False, 'screen_display': False, 'full_dust': False, 'indoor_temperature': 32.8, 'outdoor_temperature': None, 'indirect_wind': False}
2024-06-07 13:43:11.671 DEBUG (Iryna’s Bedroom AC) [custom_components.midea_ac_lan.midea.devices.ac.device] [152832116619840] Received: {'header': 'aa28ac00000000000303', 'body': 'c0004b667f7f000000000076ff0f00040000000000000000000000000d6d', 'message type': '03', 'body type': 'c0'}
2024-06-07 13:43:11.671 DEBUG (Iryna’s Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [152832116619840] Status update: {'power': False, 'mode': 2, 'target_temperature': 27.0, 'fan_speed': 102, 'swing_vertical': False, 'swing_horizontal': False, 'smart_eye': False, 'dry': False, 'aux_heating': False, 'boost_mode': False, 'sleep_mode': False, 'frost_protect': False, 'comfort_mode': False, 'eco_mode': False, 'natural_wind': False, 'temp_fahrenheit': False, 'screen_display': False, 'full_dust': False, 'indoor_temperature': 34.4, 'outdoor_temperature': None, 'indirect_wind': False}
2024-06-07 13:43:11.687 DEBUG (Semyon’s Bedroom AC) [custom_components.midea_ac_lan.midea.devices.ac.device] [153931628246689] Received: {'header': 'aa28ac00000000000303', 'body': 'c0012d657f7f00000000006b8411004600000000000000000000000010a6', 'message type': '03', 'body type': 'c0'}
2024-06-07 13:43:11.687 DEBUG (Semyon’s Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [153931628246689] Status update: {'power': True, 'mode': 1, 'target_temperature': 29.0, 'fan_speed': 101, 'swing_vertical': False, 'swing_horizontal': False, 'smart_eye': False, 'dry': False, 'aux_heating': False, 'boost_mode': False, 'sleep_mode': False, 'frost_protect': False, 'comfort_mode': False, 'eco_mode': False, 'natural_wind': False, 'temp_fahrenheit': False, 'screen_display': True, 'full_dust': False, 'indoor_temperature': 28.6, 'outdoor_temperature': 41.4}
2024-06-07 13:43:11.802 DEBUG (Guest Bedroom AC) [custom_components.midea_ac_lan.midea.devices.ac.device] [153931628246889] Received: {'header': 'aa29ac00000000000303', 'body': 'b106420000010118000000150000012c1700000164330200004b0000000035', 'message type': '03', 'body type': 'b1'}
2024-06-07 13:43:11.802 DEBUG (Guest Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [153931628246889] Status update: {'screen_display_alternate': True, 'indirect_wind': False, 'indoor_humidity': 44, 'screen_display': False}
2024-06-07 13:43:11.817 DEBUG (Iryna’s Bedroom AC) [custom_components.midea_ac_lan.midea.devices.ac.device] [152832116619840] Received: {'header': 'aa29ac00000000000303', 'body': 'b10642000001011800000015000001271700000164330200004b00000000c8', 'message type': '03', 'body type': 'b1'}
2024-06-07 13:43:11.817 DEBUG (Iryna’s Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [152832116619840] Status update: {'screen_display_alternate': True, 'indirect_wind': False, 'indoor_humidity': 39, 'screen_display': False}
2024-06-07 13:43:11.826 DEBUG (Semyon’s Bedroom AC) [custom_components.midea_ac_lan.midea.devices.ac.device] [153931628246689] Received: {'header': 'aa29ac00000000000303', 'body': 'b10642000001011800000015000001361700000164330200004b0000000080', 'message type': '03', 'body type': 'b1'}
2024-06-07 13:43:11.827 DEBUG (Semyon’s Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [153931628246689] Status update: {'screen_display_alternate': True, 'indirect_wind': False, 'indoor_humidity': 54}
2024-06-07 13:43:11.912 DEBUG (Guest Bedroom AC) [custom_components.midea_ac_lan.midea.devices.ac.device] [153931628246889] Received: {'header': 'aa20ac00000000000303', 'body': 'c12101440000000000000000000000000000000001df', 'message type': '03', 'body type': 'c1'}
2024-06-07 13:43:11.912 DEBUG (Guest Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [153931628246889] Status update: {'total_energy_consumption': 0.0, 'current_energy_consumption': 0.0, 'realtime_power': 0.0, 'indirect_wind': False, 'screen_display': False}
2024-06-07 13:43:11.922 DEBUG (Iryna’s Bedroom AC) [custom_components.midea_ac_lan.midea.devices.ac.device] [152832116619840] Received: {'header': 'aa20ac00000000000303', 'body': 'c12101440000000000000000000000000000000001df', 'message type': '03', 'body type': 'c1'}
2024-06-07 13:43:11.922 DEBUG (Iryna’s Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [152832116619840] Status update: {'total_energy_consumption': 0.0, 'current_energy_consumption': 0.0, 'realtime_power': 0.0, 'indirect_wind': False, 'screen_display': False}
2024-06-07 13:43:11.937 DEBUG (Semyon’s Bedroom AC) [custom_components.midea_ac_lan.midea.devices.ac.device] [153931628246689] Received: {'header': 'aa20ac00000000000303', 'body': 'c12101440000000000000000000000000000000001df', 'message type': '03', 'body type': 'c1'}
2024-06-07 13:43:11.938 DEBUG (Semyon’s Bedroom AC) [custom_components.midea_ac_lan.midea.core.device] [153931628246689] Status update: {'total_energy_consumption': 0.0, 'current_energy_consumption': 0.0, 'realtime_power': 0.0}

Feature request: manually set vertical vent angle on midea ac / midea ac duo

设备类型及型号 (或SN)

midea ac duo

新功能的描述

This is a continuation of this issue from last year: georgezhao2010/midea_ac_lan#243

in the midea app, it is possible to manually set the angle of the vertical vent on the midea 12k btu ac unit and the midea duo (i have both). I would love it if it was possible to manually set the vent direction in home assistant, as I am currently having to do it maually using the midea app.

happy to help troubleshoot or debug or run test code!

The washing machine sensor cannot be displayed normally in homekit

HA Version

2024.5.4

Integration Version

v0.4.1

Device Type and Model

Front Load Washer 38124999 (14404)

App in Use

Midea MSmartHome

Detailed Issue Description

After adding the washer and dryer to the HA dashboard, they display correctly.
image
However, when I connect the sensors to Homekit via the Homekit bridge, they do not display correctly in the Home app.Currently, I have simulated two sensors for the washing machine as a binary_sensor and a temperature sensor, but displaying time with a temperature sensor doesn't feel user-friendly. The configuration is as follows:

input_select:
  washing_machine_status:
    name: 洗衣机状态
    options:
      - "空闲"
      - "洗涤"
      - "漂洗"
      - "甩干"
    initial: "空闲"
    


automation:
  - alias: 更新洗衣机状态
    trigger:
      - platform: state
        entity_id: sensor.188016xxx26566_progress
    action:
      - service: input_select.select_option
        target:
          entity_id: input_select.washing_machine_status
        data:
          option: >
            {% set step = states('sensor.188016xxx826566_progress') %}
            {% if step == 'Idle' %}
              空闲
            {% elif step == 'Wash' %}
              洗涤
            {% elif step == 'Rinse' %}
              漂洗
            {% elif step == 'Spin' %}
              甩干
            {% else %}
              未知
            {% endif %}
  
sensor:
  - platform: template
    sensors:
      washing_machine_remaining_time_as_temperature:
        friendly_name: "洗衣机剩余时间"
        unit_of_measurement: "°C"
        value_template: >
          {% set time_remaining = states('sensor.18801648xxx6566_time_remaining') %}
          {% if time_remaining in ['未知', 'unavailable', '', 'unknown'] %}
            0
          {% else %}
            {{ time_remaining | int }}
          {% endif %}

binary_sensor:
  - platform: template
    sensors:
      washing_machine_idle:
        friendly_name: "空闲"
        value_template: "{{ is_state('input_select.washing_machine_status', '空闲') }}"

      washing_machine_wash:
        friendly_name: "洗涤"
        value_template: "{{ is_state('input_select.washing_machine_status', '洗涤') }}"

      washing_machine_rinse:
        friendly_name: "漂洗"
        value_template: "{{ is_state('input_select.washing_machine_status', '漂洗') }}"

      washing_machine_spin:
        friendly_name: "甩干"
        value_template: "{{ is_state('input_select.washing_machine_status', '甩干') }}"

Is there any way to make the sensors display correctly in Homekit?

The logs

No response

洗衣机状态不更新

HA版本

2024.6.2

集成版本

0.4.1

设备类型及型号

Top Load Washer 38019361 (27700)

使用的App

美的美居

问题详细描述

我在app开启后,HA上状态不会同步,必须要重载状态才会更新,而且,在HA点击也没用

Snipaste_2024-06-14_17-32-36
Snipaste_2024-06-14_17-32-04

The logs

No response

v0.4.1版本日志报错,导致日志文件大小急剧增加

HA版本

2024.5.3

集成版本

v0.4.1

设备类型及型号

AIR

使用的App

美的美居

问题详细描述

v0.4.1版本日志报错,导致home-assistant.log日志文件大小急剧增加,占满磁盘空间。

The logs

日志: homeassistant
来源: helpers/entity.py:1665
首次发生: 2024年6月3日 下午11:37:28 (20988 全部发生)
上次记录: 上午8:17:08

Error doing job: Exception in callback Entity._async_write_ha_state_from_call_soon_threadsafe()
Traceback (most recent call last):
File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1001, in _async_write_ha_state_from_call_soon_threadsafe
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1015, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:
^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/fan.py", line 159, in is_on
return self.state == STATE_ON
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1665, in state
if (is_on := self.is_on) is None:

             ^^^^^^^^^^

RecursionError: maximum recursion depth exceeded

求更新小天鹅809洗衣机

设备类型及型号 (或SN)

0000DB5133812787441196xxxxxxxxxx

新功能的描述

现有的集成会提示无法连接指定设备,洗衣机型号是TG100UTEC

现在在列表中能看到该设备,且显示支持连接。美的美居中可以看到实时状态以及控制。求集成支持该设备的状态更新

[152832116461697] Unknown error

HA core version

2024.5.5

Integration version

v0.4.0 (even if in the manifest.json file the version reported is v0.4.0-alpha)

Device type and model

Air Conditioner 00000Q18 (44204)

Used App

MSartHome and Home Assistant

The description of problem

Registratore: midealocal.device
Fonte: /usr/local/lib/python3.12/site-packages/midealocal/device.py:397
Prima occorrenza: 11:47:39 (1 occorrenze)
Ultima registrazione: 11:47:39

[152832116461697] Unknown error :/usr/local/lib/python3.12/site-packages/midealocal/device.py, 378, Exception('not an 8370 message')

the same error also occurred with previous versions of Midea AC Lan, which I reported here:
https://github.com/CyrielRct/midea_ac_lan/issues/8#issue-2278947288

The logs

2024-05-31 11:47:39.529 ERROR (AC Tavernetta) [midealocal.device] [152832116461697] Unknown error :/usr/local/lib/python3.12/site-packages/midealocal/device.py, 378, Exception('not an 8370 message')

home-assistant_midea_ac_lan_2024-05-31T17-03-43.741Z.log

HA升级2024.5.2后美的空调实体变不可用,也无法重新添加

HA版本

2024.5.2

集成版本

v0.4.0-alpha

设备类型及型号

美的风管机

使用的App

美的美居

问题详细描述

美的风管机星光科技版,之前添加控制都正常,ha升级到2024.5.2之后空调实体变得不可用,其余美的设备全部正常,删除空调实体后无法重新添加,自动添加或通过IP添加都找不到设备,有办法修复或解决吗?

The logs

No response

To do List

Device type and model (or SN)

To do List

The description of new feature

  • 1. fork and sync with new code changes [done]
  • 2. add github action to auto release midea_ac_lan.zip [done]
  • 3. add more Collaborator in current repo [done]
  • 4. remove old midea_ac_lan from HACS default integration
  • 5. add new midea_ac_lan repo to HACS default integration
  • 6. add github action lint all the codes in PR, also include old source code linter error fix.
  • 7. add testcase script, it also may cost more time to do, but I will continue track with it.
  • 8. disable push to master branch and only accept PR
  • 9. repo mixed with both CRLF and LF in source code, convert all the CRLF file to LF format.
  • 10. disabled default commit merge method and only use squash and rebase merge
  • 11. github lint action disabled PYLINT and MYPY checks as there is too many error, will be continue fix in future

In additional, we have more contributers to continue work with it now.
I have add @rokam @attilaersek @Necroneco @chemelli74 @Qianli-Ma as collaborators to current repo.

All of use can merge PR in future and we don't need to worry about the merge permission controlled in one people.

升级0.4.2后无法控制风管机

HA版本

2024.6.1

集成版本

0.4.2

设备类型及型号

Air Conditioner 230J6225 (44204)

使用的App

美的美居

问题详细描述

As title

The logs

2024-06-21 19:44:53.457 ERROR (**空调三) [midealocal.device] [210006726456147] Error in process message, msg = aa6aac00000000000805bb6000ffff3000ff00000060096009000000c00000000500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fe
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/midealocal/device.py", line 363, in parse_message
self.update_all(status)
File "/usr/local/lib/python3.12/site-packages/midealocal/device.py", line 447, in update_all
update(status)
File "/config/custom_components/midea_ac_lan/climate.py", line 225, in update_state
elif preset_mode == PRESET_BOOST:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1231, in schedule_update_ha_state
self.hass.loop.call_soon_threadsafe(
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 838, in call_soon_threadsafe
self._check_closed()
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 540, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

C3 heat pump - how to activate “super_silent" mode ?

HA core version

2024.6.1

Integration version

0.4.1

Device type and model

Heat Pump Wi-Fi Controller 171H120F

Used App

SmartHome

The description of problem

Hello,

in the source code of the C3 heat pump there are the modes “silent_mode” and “super_silent”.

There is a switch in the HA for “silent_mode”.
But there is nothing like this for “super_silent”.

Does anyone know how to activate the “super_silent” mode ?

References:
georgezhao2010/midea_ac_lan#339
georgezhao2010/midea_ac_lan@448410e

The logs

No response

Fan speed not working from HomeKit

HA core version

2024.5.5

Integration version

0.4.1

Device type and model

Inventor Omnia eco

Used App

Msmarthome

The description of problem

Fan speed is not working in HomeKit. I can see the fan speed slider, but setting it to any level does not transfer the command to the unit.

The logs

No response

Make minimum HA version less than latest

HA core version

2024.4.4

Intergration version

0.3.23

Device type and model

n/a

Used App

n/a

The description of problem

A recent commit bumped the minimum required HA version to 2024.5 while correcting the HACS filename (mieda -> midea). 2024.5 is latest as of this writing. I did not see anything in the commit that indicated why this was done, and nothing jumped out as actually requiring 2024.5 per se.

Could we restore original minimum version of 2022.5? Or least something less recent than latest where some users are reporting issues with. Maybe 2023.1 since it is the required version in the README?

The logs

n/a

Midea AC Mobile 35C - losing connection (LAN) after removing access to internet.

Hi
I'm not sure if this is a bug or a misconfiguration on my part, but after a successful installation of the Midea AC LAN (including the fork from here), I lose access to the air conditioner when I block internet access. This means my setup isn't cloud-free, which I thought it should be. Am I doing something wrong? Or is this a code issue? Has anyone found a way to configure it to be permanently cloud-free?

add multiple device should cache login info in memory

Device type and model (or SN)

none

The description of new feature

in this chanages:
1f56e69
we have removed write username/password to local json file, and not save username/password in local disk.

it caused a small issue:
if user have more than 5-10+ device to be add, they should add each device and input login username/password every time.
we can cache it in memory and not write to file, can be done in future

add device with File exists error

HA版本

2024.6.4

集成版本

0.4.2

设备类型及型号

none

使用的App

美的美居

问题详细描述

2024-06-25 09:51:19.669 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
return await func(self, request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 70, in wrapper
return await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure
result = await self._async_configure(flow_id, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 517, in _async_handle_step
result: _FlowResultT = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/midea_ac_lan/config_flow.py", line 480, in async_step_manually
self._save_device_config(data)
File "/config/custom_components/midea_ac_lan/config_flow.py", line 127, in _save_device_config
Path.mkdir(storage_path, parents=True)
File "/usr/local/lib/python3.12/pathlib.py", line 1311, in mkdir
os.mkdir(self, mode)
FileExistsError: [Errno 17] File exists: '/config/.storage/midea_ac_lan'

The logs

No response

Please add support for Midea MFP-120i

Device type and model (or SN)

Fan 560000AG (0)

The description of new feature

Hi,
Just found this repo, after I've got no answer on the original one.

I'd purchased my new Fan with built in Purifier and so far, it works partly in Hassio, but the feature set is pretty limited. At the moment, HA with this integration only supports the following endpoints:

(✅ = supported, ❌ = should be removed, ❓ = missing)

  • ✅ Power on (with the Device name as switch - maybe a duplicate)
  • ❓ Child Lock (don't know if it works)
  • ✅ Oscillate (Switch)
  • ❌ Oscillation Angle (not supported - should be removed)
  • ❌ Oscillation Mode (not supported - should be removed)
  • ✅ Power (Switch - this might be the real state)
  • ❌ Tilting Angle (not supported, cause the Fan doesn't tilt - should be removed)
  • ✅ Preset Modes
    • Normal (Supported)
    • Natural
    • Sleep (Supported)
    • Comfort
    • Silent
    • Baby
    • Induction
    • Circulation
    • Strong
    • Soft
    • Customize
    • Warm
    • Smart (Supported)
    • ❓ One mode is missing: it might be called Ionic or something.
  • ❓ Percentage (Strength of the Ventilation aka "percentage_step" or "speed_count") => must be set to 10% (default is 33%)

Missing entities

  • ❓ Temperature [sensor, celsius/fahrenheit]
  • ❓ Filter Status (Purifier, 2 Filters) [sensor, number/percentage]
  • ❓Timer (Set timer) [slider or input, HH:MM:SS]
  • ❓Remaining Time [sensor, number/time]
  • ❓Turn Display on/off [switch]

I hope those infos where helpful and thank you for your amazing work so far!

报错SyntaxError: unterminated string literal (detected at line 271)

HA core version

2024.3.3

Integration version

MASTER BRANCH

Device type and model

water application

Used App

美的美居

The description of problem

装了之后报错
File "/var/packages/HomeAssistant/home/.homeassistant/custom_components/midea_ac_lan/config_flow.py", line 271
] = f"{device_id} ({self.supports.get(
^
SyntaxError: unterminated string literal (detected at line 271)

改成如下就可以了
self.available_device[device_id] = (
f"{device_id} ({self.supports.get(device.get(CONF_TYPE))})"
)

The logs

日志: homeassistant.loader
来源: loader.py:1025
首次发生: 13:34:56 (3 全部发生)
上次记录: 13:42:40

Unexpected exception importing platform custom_components.midea_ac_lan.config_flow
Traceback (most recent call last):
File "/var/packages/HomeAssistant/target/lib/python3.11/site-packages/homeassistant/loader.py", line 1025, in _load_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/packages/HomeAssistant/target/lib/python3.11/site-packages/homeassistant/loader.py", line 1058, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/packages/python311/target/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 936, in exec_module
File "", line 1074, in get_code
File "", line 1004, in source_to_code
File "", line 241, in _call_with_frames_removed
File "/var/packages/HomeAssistant/home/.homeassistant/custom_components/midea_ac_lan/config_flow.py", line 271
] = f"{device_id} ({self.supports.get(
^
SyntaxError: unterminated string literal (detected at line 271)

请求添加小天鹅蓝洋二代洗衣机和干衣机套装

设备类型及型号 (或SN)

小天鹅蓝氧二代洗衣机和干衣机

新功能的描述

小天鹅干衣机-蓝氧二代
设备型号:211106239178619
类型:DC
SN:0000DC513382078213B165AXXXXXXXXXX

小天鹅洗衣机-蓝氧二代
设备型号:208907215418186
SN:0000DB5133812992941025XXXXXXXXXX

并且请求支持这两个设备对于用电量的支持(美的美居里可以看到)。

目前Midea AC LAN 可以搜索到设备,且显示支持,但是在插件里连接的时候提示无法连接到指定设备。

Can't add Midea dishwasher MFD60S510Wi

Versions
Midea AC LAN 0.3.23
HA with latest updates

Description
Sorry for my bad English. I have Midea dishwasher MFD60S510Wi (static IP), when adding a device to HA it is automatically found, but when confirming I see a message in the form "The configuration is incorrect". If changing model to correct - same message.
Log in configuration.yaml enabled, but there's nothing in it.
If use Protocol V1 or V2 device is adding to HA, but all sensors are unavailable. Log attached below.
P.S. Integration update to alfa version available in HA, but it won't download.

02
03
04
05
06

Help: We need you help us for code feature testing | 我们需要更多设备进行代码功能测试

Device type and model (or SN)

None

The description of new feature

Hi Friends

Thank you very much for your using current midea_ac_lan repo in HA.
we did more code changes and code format update, and before releasing a stable version, we need your help.
Could you help us to test and verify our latest code changes with your devices?
Please join us with Discord Chat online.

Join Discord Chat

Thanks!


朋友们

大家好,非常感谢您在Home Assiant中使用我们当前正在持续开发中的midea_ac_lan, 近期我们做了大量代码规范和格式上的调整,为了保证发布版本的稳定性和功能可用性,我们需要您的帮助:
可否使用您的设备来帮助我们测试和验证最新的代码修改?
请加入我们的Discord交流群组,可以支持中文或英文快速进行交流。
如果您能够访问Github,相信访问Discord也并不是什么难事,支持网页,PC,手机。

加入Discord交流群

问题:为什么不直接使用微信群? 可以考虑后续基于Discord交流群来完成,但是目前暂时不会直接基于Github来发布,统一使用Discord交流群作为入口

非常感谢!

理想家二代部分内机添加不成功

HA版本

2024.4.3

集成版本

0.4.2

设备类型及型号

Air Conditioner 22396311 (44204)

使用的App

美的美居

问题详细描述

理想家二代,5台内机。3台内机正常添加,另外两台添加时提示“无法连接到指定设备”,日志显示“认证失败”。确定美居账号密码没问题,用其他版本的ac_lan还会提示用户名密码错误。其中一台最初能添加成功,跟另外一台不能添加的面板互换位置后都无法添加了。

The logs

2024-06-22 17:11:59.004 DEBUG (MainThread) [midealocal.device] [210006725387346] Connecting to 192.168.123.55:6444
2024-06-22 17:11:59.154 DEBUG (MainThread) [midealocal.device] [210006725387346] Connected
2024-06-22 17:11:59.154 DEBUG (MainThread) [midealocal.device] [210006725387346] Handshaking
2024-06-22 17:11:59.213 DEBUG (MainThread) [midealocal.device] [210006725387346] Authentication failed
2024-06-22 17:11:59.213 DEBUG (MainThread) [midealocal.device] [210006725387346] Status update: {'available': False}
2024-06-22 17:11:59.214 DEBUG (MainThread) [midealocal.device] [210006725387346] Connecting to 192.168.123.55:6444
2024-06-22 17:11:59.225 DEBUG (MainThread) [midealocal.device] [210006725387346] Connected
2024-06-22 17:11:59.226 DEBUG (MainThread) [midealocal.device] [210006725387346] Handshaking
2024-06-22 17:11:59.394 DEBUG (MainThread) [midealocal.device] [210006725387346] Authentication failed
2024-06-22 17:11:59.394 DEBUG (MainThread) [midealocal.device] [210006725387346] Status update: {'available': False}
2024-06-22 17:11:59.395 DEBUG (MainThread) [midealocal.device] [210006725387346] Connecting to 192.168.123.55:6444
2024-06-22 17:11:59.408 DEBUG (MainThread) [midealocal.device] [210006725387346] Connected
2024-06-22 17:11:59.408 DEBUG (MainThread) [midealocal.device] [210006725387346] Handshaking
2024-06-22 17:11:59.560 DEBUG (MainThread) [midealocal.device] [210006725387346] Authentication failed
2024-06-22 17:11:59.561 DEBUG (MainThread) [midealocal.device] [210006725387346] Status update: {'available': False}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.