228 Commits

Author SHA1 Message Date
J. Nick Koston
bb2bd086bc
Add missing adapter data to Bluetooth config entry titles (#115930) 2024-04-23 21:52:55 +02:00
J. Nick Koston
1d6ae01baa
Handle Bluetooth adapters in a crashed state (#115790)
* Skip bluetooth discovery for Bluetooth adapters in a crashed state

* fixes

* fixes

* adjust

* coverage

* coverage

* fix race
2024-04-18 15:06:53 -05:00
J. Nick Koston
53c48537d7
Add bluetooth adapter model and manufacturer to config flow (#115780)
* Show bluetooth adapter model and manufacturer in config flow

If there are multiple adapters, it could be a bit difficult
to figure out which one is which

* Show bluetooth adapter model and manufacturer in config flow

If there are multiple adapters, it could be a bit difficult
to figure out which one is which

* reorder

* reorder

* names

* remove

* fix incomplete mocking

* more missing mocks
2024-04-18 10:39:32 -04:00
J. Nick Koston
98ed6e7fe5
Bump habluetooth to 2.7.0 (#115783) 2024-04-17 17:47:40 -05:00
J. Nick Koston
6dcfe861fd
Bump habluetooth to 2.5.2 (#115721) 2024-04-16 18:34:57 -05:00
Sid
5f055a64bb
Enable Ruff B017 (#115335) 2024-04-15 22:25:09 +02:00
Sid
d61db732da
Enable Ruff SLOT rules (#115043) 2024-04-09 18:57:27 -10:00
epenet
0b01326f9f
Use is in ConfigEntryState enum comparison in tests (A-M) (#114925) 2024-04-05 17:16:55 +02:00
Joost Lekkerkerker
9b41e3d124
Use is in enum comparison in config flow tests A-E (#114669) 2024-04-02 11:22:05 -10:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
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
Sid
27e844e3bf
Add ruff B005, B015, B032 and fix occurrences (#113543)
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-15 17:48:37 -10:00
soonsouth
cfc2f17f35
Remove repetitive words in comments and docstrings (#113529)
chore: remove repetitive words

Signed-off-by: soonsouth <cuibuwei@163.com>
2024-03-15 18:11:12 +01:00
J. Nick Koston
c948392ebc
Make Bluetooth active coordinator debouncers run tasks in the background (#113129) 2024-03-12 07:43:43 -10:00
J. Nick Koston
a2318c26c9
Run debouncer tasks eagerly to avoid scheduling on the event loop (#112789) 2024-03-10 08:37:10 -10:00
Marc Mueller
aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller
38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
J. Nick Koston
e25b097376
Import bluetooth in the executor to avoid blocking the event loop (#111596) 2024-02-27 07:05:39 -10:00
Marc Mueller
2ef2172b01
Convert test helpers to get hass instance to contextmanagers (#109990)
* Convert get_test_home_assistant helper to contextmanager

* Convert async_test_home_assistant helper to contextmanager

* Move timezone reset to async_test_home_assistant helper
2024-02-11 21:23:51 +01:00
Joost Lekkerkerker
6519b24319
Make bluetooth use naming from the entity description (#97401)
* Make bluetooth use the translation from the entity description

* Remove links to other platforms

* Remove links to other platforms

* Remove links to other platforms

* Add test

* Use is

* Fix test

* Update homeassistant/components/bluetooth/passive_update_processor.py

Co-authored-by: J. Nick Koston <nick@koston.org>

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-06 17:12:15 +01:00
Marc Mueller
c82933175d
Use builtin TimeoutError [a-d] (#109678) 2024-02-05 11:31:33 +01:00
J. Nick Koston
8d4a1f475e
Bump habluetooth to 2.3.1 (#108628) 2024-01-21 18:39:17 -10:00
J. Nick Koston
c399cab427
Small speed up to checking core state (#107845) 2024-01-18 08:41:32 -10:00
J. Nick Koston
07810926d0
Update habluetooth to 2.2.0 (#108000)
* Update habluetooth to 2.2.0

* fixes

* lib
2024-01-13 23:50:47 -05:00
J. Nick Koston
ce11366b9c
Bump bluetooth deps (#107816) 2024-01-12 09:45:49 +01:00
J. Nick Koston
efffbc08aa
Add support for bluetooth local name matchers shorter than 3 chars (#107411) 2024-01-07 18:25:56 -10:00
J. Nick Koston
0ccf8ffbc6
Bump habluetooth to 2.0.2 (#107097) 2024-01-04 02:45:47 -10:00
J. Nick Koston
bfda3f1ba8
Bump habluetooth to 2.0.1 (#106750)
fixes switching scanners to quickly since the manager failed
to account for jitter in the auto discovered advertising interval

replaces and closes #96531

changelog: https://github.com/Bluetooth-Devices/habluetooth/compare/v2.0.0...v2.0.1
2023-12-31 06:44:55 -10:00
J. Nick Koston
e50fe79911
Update habluetooth to 2.0.0 (#106145) 2023-12-20 20:37:39 -10:00
J. Nick Koston
5dbd0dede1
Refactor Bluetooth scanners to avoid the need to pass a callback (#105607) 2023-12-13 09:17:48 +01:00
J. Nick Koston
f002a6a732
Refactor all Bluetooth scanners to inherit from BaseHaRemoteScanner (#105523) 2023-12-12 21:28:43 +01:00
J. Nick Koston
e2abd3b8d0
Bump bluetooth libraries (#105522) 2023-12-12 08:31:23 +01:00
J. Nick Koston
e890671192
Relocate Bluetooth manager to habluetooth library (#105110)
* 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 b7e7127143bd2947345c7590fc2727aa47e28d88.

* float
2023-12-11 15:42:00 -05:00
J. Nick Koston
a528183556
Bump habluetooth to 0.8.0 (#105109) 2023-12-06 08:15:24 +01:00
J. Nick Koston
94d168e20e
Move Bluetooth advertisement tracker to habluetooth library (#105083) 2023-12-05 19:53:29 +01:00
J. Nick Koston
b6245c834d
Move local bluetooth scanner code into habluetooth library (#104970) 2023-12-05 07:19:02 -10:00
J. Nick Koston
28584ad240
Relocate base Bluetooth scanner code into an external library (#104930) 2023-12-03 10:00:11 -10:00
J. Nick Koston
dd9c22672a
Refactor bluetooth scanners for better seperation of concerns (#104909) 2023-12-02 13:20:06 -10:00
Aarni Koskela
706add4a57
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
J. Nick Koston
d3b4dd226b
Prevent Bluetooth reconnects from blocking shutdown (#104150) 2023-11-19 08:22:26 -06:00
Jan-Philipp Benecke
43915fbaf3
Add connections to PassiveBluetoothProcessorEntity (#102854) 2023-10-27 12:09:59 +02:00
Erik Montnemery
64f0ea60d1
Correct logic for picking bluetooth local name (#102823)
* Correct logic for picking bluetooth local name

* make test more robust

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-10-25 18:08:31 -05:00
J. Nick Koston
b3bd34a024
Avoid dispatching same state to passive bluetooth entities (#102430) 2023-10-22 14:08:28 +02:00
J. Nick Koston
f9dbddc884
Small cleanups to Bluetooth fallback intervals (#102440) 2023-10-21 10:06:49 -10:00
Raman Gupta
067b94899f
Move EVENT_LOGGING_CHANGED to constants (#100974)
* Move EVENT_LOGGING_CHANGED to constants

* fix test

* remove logger as dependency for bluetooth and fix test
2023-09-27 01:06:14 -04:00
J. Nick Koston
667f4b1ca8
Mark Bluetooth scanner as not scanning when watchdog timeout is reached (#100738) 2023-09-26 05:29:46 -05:00
Jc2k
f0375eb97e
Expose bluetooth availability tracking interval controls to integrations (#100774) 2023-09-24 10:45:25 +02:00
J. Nick Koston
63273a307a
Fix Bluetooth passive update processor dispatching updates to unchanged entities (#99527)
* Fix passive update processor dispatching updates to unchanged entities

* adjust tests

* coverage

* fix

* Update homeassistant/components/bluetooth/update_coordinator.py
2023-09-04 20:42:05 -04:00
J. Nick Koston
3ebf96143a
Improve performance of bluetooth coordinators (#98997) 2023-08-25 10:31:43 +02:00
Erik Montnemery
045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00