mac-zhou / midea-ac-py

Home Assistant Custom Integration for Midea Group(Hualing, Senville, Klimaire, AirCon, Century, Pridiom, Thermocore, Comfee, Toshiba, Carrier, Goodman, Friedrich, Samsung, Kenmore, Trane, Lennox, LG and much more) Air Conditioners via LAN.
MIT License
539 stars 103 forks source link

Device id includes letters so HA throws an error: invalid literal for int() with base 10 #161

Open ChristophHoltmann opened 2 years ago

ChristophHoltmann commented 2 years ago

Describe the bug I tried to setup the device with the id I got from the QR Code (same as in the app). The id of my comfee air conditioner device includes letters. At start Home Assistant throws this error:

Error while setting up midea_ac platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/midea_ac/climate.py", line 79, in async_setup_platform
    device = ac(device_ip, int(device_id), device_port)
ValueError: invalid literal for int() with base 10: 'P0000000Q1************'

Is it the wrong id?

Versions