diff --git a/custom_components/bermuda/coordinator.py b/custom_components/bermuda/coordinator.py index 1a774ab..eb3f8f7 100644 --- a/custom_components/bermuda/coordinator.py +++ b/custom_components/bermuda/coordinator.py @@ -153,7 +153,7 @@ def __init__( self._manager: HomeAssistantBluetoothManager = _get_manager(hass) # instance of the bluetooth manager self._hascanners: set[BaseHaScanner] # Links to the backend scanners - self._hascanner_timestamps: dict[str, dict[str, float]] = {} # scanner_address, device_address, stamp + self._hascanner_timestamps: dict[str, dict[str, float]] = {} # scanner_address, device_address, stamp self._entity_registry = er.async_get(self.hass) self._device_registry = dr.async_get(self.hass) @@ -1121,7 +1121,7 @@ def _refresh_scanners(self, scanners: list[BluetoothScannerDevice] | None = None scanner_devreg = self._device_registry.async_get_device( connections={ ("mac", scanner_address), # Matches ESPHome proxies, Shellys etc - ("bluetooth", scanner_address), # Matches local USB Bluetooth (hci0..) + ("bluetooth", scanner_address.upper()), # Matches local USB Bluetooth (hci0..) } ) if scanner_devreg is None: diff --git a/custom_components/bermuda/entity.py b/custom_components/bermuda/entity.py index 42558b6..80b2918 100644 --- a/custom_components/bermuda/entity.py +++ b/custom_components/bermuda/entity.py @@ -184,7 +184,7 @@ def _handle_coordinator_update(self) -> None: """ self.async_write_ha_state() - def _cached_ratelimit(self, statevalue: Any, interval:int|None=None): + def _cached_ratelimit(self, statevalue: Any, interval: int | None = None): """A simple way to rate-limit sensor updates.""" if interval is not None: self._cache_ratelimit_interval = interval