Commit graph

66 commits

Author SHA1 Message Date
epenet
0b01326f9f
Use is in ConfigEntryState enum comparison in tests (A-M) () 2024-04-05 17:16:55 +02:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 ()
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] () 2024-03-08 19:16:21 +01:00
J. Nick Koston
e25b097376
Import bluetooth in the executor to avoid blocking the event loop () 2024-02-27 07:05:39 -10:00
Marc Mueller
c82933175d
Use builtin TimeoutError [a-d] () 2024-02-05 11:31:33 +01:00
J. Nick Koston
efffbc08aa
Add support for bluetooth local name matchers shorter than 3 chars () 2024-01-07 18:25:56 -10:00
J. Nick Koston
e50fe79911
Update habluetooth to 2.0.0 () 2023-12-20 20:37:39 -10:00
J. Nick Koston
e890671192
Relocate Bluetooth manager to habluetooth library ()
* Relocate Bluetooth manager to habluetooth library

* Relocate Bluetooth manager to habluetooth library

* Relocate Bluetooth manager to habluetooth library

* fixes

* fix patching time

* fix more tests

* fix more tests

* split

* Bump habluetooth to 0.7.0

changelog: https://github.com/Bluetooth-Devices/habluetooth/compare/v0.6.1...v0.7.0

This is the big change that will move the manager so the HA
PR that will follow this will be a bit larger than the rest of them
since the manager is connected to everything

* fix types

* fix types

* fix types

* fix patch targets

* fix flakey logbook tests (will need another PR)

* mock shutdown

* bump again

* value can be a float now

* Revert "value can be a float now"

This reverts commit b7e7127143.

* float
2023-12-11 15:42:00 -05:00
J. Nick Koston
b6245c834d
Move local bluetooth scanner code into habluetooth library () 2023-12-05 07:19:02 -10:00
J. Nick Koston
28584ad240
Relocate base Bluetooth scanner code into an external library () 2023-12-03 10:00:11 -10:00
J. Nick Koston
6ae79524bd
Add support for bleak 0.21 () 2023-07-25 19:30:54 +02:00
J. Nick Koston
17d1c0733d
Remove outdated HAOS check from bluetooth () 2023-05-30 19:41:51 +02:00
J. Nick Koston
90e92aa9d8
Add test case for matching the shelly button () 2023-04-19 11:26:21 -04:00
J. Nick Koston
c3043fb0ee
Bump bluetooth deps for bleak 0.20 ()
Co-authored-by: K <z@kwi.li>
2023-03-20 12:06:15 +01:00
Franck Nijhof
6891eb7ed1
Add support for snapshot testing ()
* Add support for snapshot testing

* Use snapshots in Elgato diagnostics test

* Use snapshots in Elgato sensor test

* Fix flake8 warning

* Slightly improve serialized output

* Remove snapshot naming in elgato sensor tests

* Improve snapshoting of via_device_id in device registry item

* Update pylint typehints plugin for snapshot fixture typing

* Use snapshots in Elgato configflow test

* Use snapshots in Bluetooth repair issue tests
2023-02-17 16:35:55 -05:00
J. Nick Koston
34e2751f14
Retrigger Bluetooth discovery when calling async_rediscover_address ()
* Retrigger Bluetooth discovery when calling async_rediscover_address

* Retrigger Bluetooth discovery when calling async_rediscover_address

* tweak
2023-02-11 16:59:51 +01:00
epenet
0cf5e9fb4a
Add type hints to integration tests (part 2) ()
* Add type hints to integration tests (part 2)

* typo

* Improve analytics

* Improve automation

* Imrpove bluetooth
2023-02-10 16:05:26 +01:00
epenet
807c69f621
Add type hints to integration tests (b-c) () 2023-02-08 18:08:43 +01:00
Franck Nijhof
24fdd588fd
Code styling tweaks to the tests - Part 1 () 2023-01-20 13:52:46 +01:00
Erik Montnemery
c4afc33fc5
Add abc.ABC to classes with abstract methods () 2022-12-08 17:50:36 +01:00
J. Nick Koston
a7caa038be
Accept advertisements from alternate scanners when a scanner stops scanning () 2022-11-21 21:23:07 -05:00
J. Nick Koston
7801cd96de
Split bluetooth models into base_scanner and wrappers () 2022-11-20 08:44:28 -06:00
J. Nick Koston
47c66dbed4
Offload platform specific bluetooth code to bluetooth-adapters ()
* Offload platform specific bluetooth code to bluetooth-adapters

* adjust

* fix some more patch targets

* more test fixes

* almost there

* may not be setup yet

* more fixes

* fixes

* fix test

* fix merge
2022-11-17 14:34:19 -05:00
J. Nick Koston
78180b2ad8
Fix bluetooth adapters with missing firmware patch files not being discovered () 2022-11-10 14:14:37 -06:00
Joakim Plate
9eb4faf037
Fire bluetooth listener for all matching devices ()
* Fire listener for all matching devices

* Add test case for seen device

* Avoid looping all data if we have address match

* Initialize to empty list
2022-10-16 21:49:12 +02:00
J. Nick Koston
d12cbab6c4
Bump bleak to 0.19.0 () 2022-10-15 13:57:23 -04:00
J. Nick Koston
0c76e3a97e
Automatically determine the advertising interval for bluetooth devices () 2022-10-14 14:39:18 -04:00
J. Nick Koston
2768b2445a
Remove call to deprecated bleak register_detection_callback () 2022-10-03 21:15:09 -04:00
J. Nick Koston
12856dea05
Create an issue when Bluetooth is active on old HAOS ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-09-19 21:02:13 -04:00
J. Nick Koston
9655f30146
Handle Modalias missing from the bluetooth adapter details on older BlueZ () 2022-09-18 21:09:45 -04:00
J. Nick Koston
d4181aa911
Fix bluetooth callback matchers when only matching on connectable () 2022-09-18 10:22:54 -05:00
J. Nick Koston
18eef5da1f
Restore history from bluetooth stack at startup () 2022-09-17 16:58:19 -05:00
J. Nick Koston
98dd84f535
Ensure bluetooth callbacks are only fired when advertisement data changes () 2022-09-17 10:26:02 +02:00
Alex Thompson
45b69618d3
Add iBeacon start byte to allowed Apple Bluetooth advertisements () 2022-09-08 18:21:58 -05:00
J. Nick Koston
804e4ab989
Prefilter noisy apple devices from bluetooth () 2022-09-04 20:57:40 -04:00
J. Nick Koston
40e8979951
Add bluetooth api to get the count of connectable and non-connectable scanners () 2022-08-29 10:21:30 -04:00
J. Nick Koston
61d5ed1dcf
Index bluetooth matchers to resolve performance concerns with many adapters/remotes () 2022-08-26 23:07:51 -04:00
J. Nick Koston
109d5c7084
Fix bluetooth discovery when advertisement format changes () 2022-08-24 17:36:21 -05:00
J. Nick Koston
d1486d04d9
Add support for bleak passive scanning on linux () 2022-08-24 12:17:28 -05:00
J. Nick Koston
c76dec138a
Discover new bluetooth adapters when they are plugged in () 2022-08-22 15:45:08 -10:00
J. Nick Koston
3938015c93
Add support for scanners that do not provide connectable devices () 2022-08-22 14:02:26 -04:00
J. Nick Koston
cd59d3ab81
Add support for multiple Bluetooth adapters () 2022-08-18 21:41:07 -04:00
J. Nick Koston
3bcc274dfa
Rework bluetooth to support scans from multiple sources () 2022-08-17 10:51:56 -10:00
J. Nick Koston
6f3cdb6db1
Reorganize bluetooth integration to prepare for remote and multi-adapter support () 2022-08-16 14:52:53 -10:00
J. Nick Koston
4890785299
Fix bluetooth callback registration not surviving a reload () 2022-08-15 10:19:37 -10:00
J. Nick Koston
1fe44d0997
Ensure bluetooth recovers if Dbus gets restarted () 2022-08-07 11:03:56 -04:00
Joakim Plate
cdde4f9925
Add bluetooth API to allow rediscovery of address ()
* Add API to allow rediscovery of domains

* Switch to clearing per device

* Drop unneded change
2022-08-05 14:49:34 +02:00
J. Nick Koston
5d7cef6416
Fix race in bluetooth async_process_advertisements () 2022-08-04 17:58:15 +02:00
J. Nick Koston
bf931f1225
Handle additional bluetooth start exceptions () 2022-08-02 13:46:43 -10:00
J. Nick Koston
80a9659524
Update to bleak 0.15 () 2022-07-29 17:53:33 -07:00