mduran80 / pymadoka

A python library to control Daikin BRC1H (Madoka) thermostat
MIT License
26 stars 8 forks source link

get_discovered_devices method deprecated in Bleak #8

Closed cosimomeli closed 1 year ago

cosimomeli commented 1 year ago

Hi, the method get_discovered_devices has been deprecated in version 0.12.0 of Bleak (https://github.com/hbldh/bleak/blob/develop/CHANGELOG.rst#0120-2021-06-19). The method is no longer present in latest version so latest daikin_madoka on Home Assistant doesn't work anymore. Indeed I got this exception:


  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/daikin_madoka/__init__.py", line 66, in async_setup_entry
    await discover_devices(
  File "/usr/local/lib/python3.10/site-packages/pymadoka/connection.py", line 56, in discover_devices
    DISCOVERED_DEVICES_CACHE = await scanner.get_discovered_devices()
AttributeError: 'HaBleakScannerWrapper' object has no attribute 'get_discovered_devices'```
mduran80 commented 1 year ago

Hi,

I just fixed it and bumped pymadoka version to 0.2.6