Skip to content

Commit

Permalink
Linting, btmanager import fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
agittins committed Oct 31, 2024
1 parent 9c1af66 commit de8bbd2
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions custom_components/bermuda/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@

import voluptuous as vol
from homeassistant.components import bluetooth
from homeassistant.components.bluetooth import MONOTONIC_TIME, BluetoothChange, BluetoothScannerDevice
from homeassistant.components.bluetooth import (
MONOTONIC_TIME,
BluetoothChange,
BluetoothScannerDevice,
)
from homeassistant.components.bluetooth.api import _get_manager
from homeassistant.const import EVENT_STATE_CHANGED
from homeassistant.core import (
Expand All @@ -21,10 +25,18 @@
SupportsResponse,
callback,
)
from homeassistant.helpers import area_registry as ar
from homeassistant.helpers import config_validation as cv
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers import entity_registry as er
from homeassistant.helpers import (
area_registry as ar,
)
from homeassistant.helpers import (
config_validation as cv,
)
from homeassistant.helpers import (
device_registry as dr,
)
from homeassistant.helpers import (
entity_registry as er,
)
from homeassistant.helpers.device_registry import (
EVENT_DEVICE_REGISTRY_UPDATED,
EventDeviceRegistryUpdatedData,
Expand Down Expand Up @@ -76,7 +88,7 @@

if TYPE_CHECKING:
from habluetooth import BluetoothServiceInfoBleak
from homeassistant.components.bluetooth import HomeAssistantBluetoothManager
from homeassistant.components.bluetooth.manager import HomeAssistantBluetoothManager
from homeassistant.config_entries import ConfigEntry

from .bermuda_device_scanner import BermudaDeviceScanner
Expand Down Expand Up @@ -375,8 +387,7 @@ def get_active_scanner_summary(self) -> list[dict]:
for device in self.devices.values():
record = device.scanners.get(scanner, None)
if record is not None and record.stamp is not None:
if record.stamp > last_stamp:
last_stamp = record.stamp
last_stamp = max(record.stamp, last_stamp)
results.append(
{
"name": scannerdev.name,
Expand Down

0 comments on commit de8bbd2

Please sign in to comment.