Commit graph

26 commits

Author SHA1 Message Date
J. Nick Koston
95641fa780
Revert "Move esphome gatt services cache to be per device" #81265 (#83793) 2022-12-11 17:50:18 -10:00
J. Nick Koston
7178cacdc2
Adjust esphome bluetooth client logging for unique id change (#83742) 2022-12-10 17:45:59 -10:00
Paulus Schoutsen
d3df4dd3c1
ESPHome: Use MAC as unique ID (#83741)
* ESPHome: Use MAC as unique ID

* Normalize incoming zeroconf/dhcp macs

* Update comment

* Test ESPHome without mac in zeroconf

* Use format_mac

* Remove unique ID index from DomainData
2022-12-10 22:26:42 -05:00
J. Nick Koston
c617e7da31
Raise an exception when an esp proxy gets empty services during connection so callers know to retry (#83211) 2022-12-04 09:05:46 -10:00
J. Nick Koston
955d4abf13
Fix missing services with esp32 proxies (#83192) 2022-12-03 13:50:59 -05:00
J. Nick Koston
de1e97a81f
Fix esphome ble client leaking notify on disconnect (#83106)
* Fix esphome ble client leaking notify on disconnect

needs: https://github.com/esphome/aioesphomeapi/pull/329

* leak

* more cleanup

* more cleanup

* bump
2022-12-02 19:45:49 -05:00
Marc Mueller
490aec0b11
Update pylint to 2.15.7 (#82977) 2022-11-30 12:20:18 +01:00
J. Nick Koston
46b18367f7
Send back BLE address type when connecting via esphome proxies (#82890) 2022-11-28 18:54:53 -10:00
J. Nick Koston
fb98128b9f
Add support for esphome ble client connections v3 (#82815) 2022-11-28 16:56:18 -10:00
J. Nick Koston
d451a74c2d
Add a destruction check to the ESPHome bluetooth client (#82760) 2022-11-27 21:17:35 -05:00
J. Nick Koston
18dd605a74
Fix un-retrieved future in esphome ble client when library raises (#82537) 2022-11-24 10:38:53 -10:00
J. Nick Koston
188cdd1bac
Ensure esphome client tasks await cancelation (#82547) 2022-11-23 10:07:05 +01:00
J. Nick Koston
a7caa038be
Accept advertisements from alternate scanners when a scanner stops scanning (#82448) 2022-11-21 21:23:07 -05:00
Marc Mueller
8f33ad38cf
Update pylint to 2.15.6 (#82440)
* Update pylint to 2.15.6

* Use single pylint disable

* Use implicit dict constructor
2022-11-21 08:58:45 +01:00
J. Nick Koston
6517e3e21e
Fix esphome bleak client seeing disconnects too late (#81932)
* Fix esphome bleak client seeing disconnects too late

Because allbacks are delivered asynchronously its possible
that we find out during the operation before the callback
is delivered telling us about the disconnected.

We now watch for error code -1 which indicates the connection
dropped out from under us

* debug logging

* cleanup comment

* Fix comment grammar

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-11-11 09:09:28 +01:00
J. Nick Koston
6495c65d10
Align esphome ble client notify behavior to match BlueZ (#81463) 2022-11-05 15:28:47 -05:00
J. Nick Koston
d87ca0b099
Improve esphome bluetooth error reporting (#81326) 2022-10-31 21:21:11 -04:00
J. Nick Koston
8db7afb2e0
Include esphome device name in BLE logs (#81284)
* Include esphome device name in BLE logs

This makes it easier to debug what is going on when there
are multiple esphome proxies

* revert unintended change
2022-10-31 00:31:37 -05:00
J. Nick Koston
ccefc510c3
Do not fire the esphome ble disconnected callback if we were not connected (#81286) 2022-10-30 22:10:30 -05:00
J. Nick Koston
c8a3392471
Move esphome gatt services cache to be per device (#81265) 2022-10-30 18:02:54 -05:00
J. Nick Koston
11d7e1e45f
Provide a human readable error when an esphome ble proxy connection fails (#81266) 2022-10-30 17:43:09 -05:00
J. Nick Koston
27a61f5407
Raise exception when esphome ble client disconnects during operation (#80885) 2022-10-24 14:04:50 -05:00
J. Nick Koston
5589edd814
Fix bluetooth calls from automations in esphome (#80683) 2022-10-20 14:35:38 -04:00
J. Nick Koston
dac60990ee
Ensure bluetooth disconnect callback fires if esphome config entry is reloaded (#79389) 2022-10-01 20:42:54 -04:00
J. Nick Koston
0b5289f748
Wait for disconnect when we are out of connection ble slots in esphome (#79246) 2022-09-29 08:42:55 -04:00
J. Nick Koston
7042d6d35b
Add ESPHome BleakClient (#78911)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-09-28 08:06:30 -10:00