fjaraskupan: Don't filter anything in backend (#72988)

pull/72792/head^2
Joakim Plate 2022-06-03 22:05:37 +02:00 committed by GitHub
parent 8e8fa0399e
commit cc807b4d59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ import logging
from bleak import BleakScanner
from bleak.backends.device import BLEDevice
from bleak.backends.scanner import AdvertisementData
from fjaraskupan import DEVICE_NAME, Device, State, device_filter
from fjaraskupan import Device, State, device_filter
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import Platform
@ -90,7 +90,7 @@ class EntryState:
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Set up Fjäråskupan from a config entry."""
scanner = BleakScanner(filters={"Pattern": DEVICE_NAME, "DuplicateData": True})
scanner = BleakScanner(filters={"DuplicateData": True})
state = EntryState(scanner, {})
hass.data.setdefault(DOMAIN, {})

View File

@ -7,7 +7,7 @@ import async_timeout
from bleak import BleakScanner
from bleak.backends.device import BLEDevice
from bleak.backends.scanner import AdvertisementData
from fjaraskupan import DEVICE_NAME, device_filter
from fjaraskupan import device_filter
from homeassistant.core import HomeAssistant
from homeassistant.helpers.config_entry_flow import register_discovery_flow
@ -28,7 +28,7 @@ async def _async_has_devices(hass: HomeAssistant) -> bool:
async with BleakScanner(
detection_callback=detection,
filters={"Pattern": DEVICE_NAME, "DuplicateData": True},
filters={"DuplicateData": True},
):
try:
async with async_timeout.timeout(CONST_WAIT_TIME):