1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Automatically determine the advertising interval for bluetooth devices (#79669)

This commit is contained in:
J. Nick Koston
2022-10-14 08:39:18 -10:00
committed by GitHub
parent a68bd8df6f
commit 0c76e3a97e
12 changed files with 625 additions and 101 deletions

View File

@@ -2595,7 +2595,7 @@ async def test_getting_the_scanner_returns_the_wrapped_instance(hass, enable_blu
async def test_scanner_count_connectable(hass, enable_bluetooth):
"""Test getting the connectable scanner count."""
scanner = models.BaseHaScanner()
scanner = models.BaseHaScanner(hass, "any")
cancel = bluetooth.async_register_scanner(hass, scanner, False)
assert bluetooth.async_scanner_count(hass, connectable=True) == 1
cancel()
@@ -2603,7 +2603,7 @@ async def test_scanner_count_connectable(hass, enable_bluetooth):
async def test_scanner_count(hass, enable_bluetooth):
"""Test getting the connectable and non-connectable scanner count."""
scanner = models.BaseHaScanner()
scanner = models.BaseHaScanner(hass, "any")
cancel = bluetooth.async_register_scanner(hass, scanner, False)
assert bluetooth.async_scanner_count(hass, connectable=False) == 2
cancel()