Bump bleak to 0.19.0 (#80349)

This commit is contained in:
J. Nick Koston 2022-10-15 07:57:23 -10:00 committed by GitHub
parent 3460e0b074
commit d12cbab6c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 638 additions and 390 deletions

View file

@ -10,7 +10,10 @@ from aiohomekit.model.characteristics import Characteristic, CharacteristicsType
from aiohomekit.model.characteristics.const import ThreadNodeCapabilities, ThreadStatus
from aiohomekit.model.services import Service, ServicesTypes
from homeassistant.components.bluetooth import async_ble_device_from_address
from homeassistant.components.bluetooth import (
async_ble_device_from_address,
async_last_service_info,
)
from homeassistant.components.sensor import (
SensorDeviceClass,
SensorEntity,
@ -571,8 +574,8 @@ class RSSISensor(HomeKitEntity, SensorEntity):
def native_value(self) -> int | None:
"""Return the current rssi value."""
address = self._accessory.pairing_data["AccessoryAddress"]
ble_device = async_ble_device_from_address(self.hass, address)
return ble_device.rssi if ble_device else None
last_service_info = async_last_service_info(self.hass, address)
return last_service_info.rssi if last_service_info else None
async def async_setup_entry(