Fix unrecoverable error when fetching airthings_ble data (#115699)

This commit is contained in:
Ståle Storø Hauknes 2024-04-17 18:47:29 +02:00 committed by GitHub
parent e4280b2c00
commit dcd61ac086
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,10 +44,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
async def _async_update_method() -> AirthingsDevice:
"""Get data from Airthings BLE."""
ble_device = bluetooth.async_ble_device_from_address(hass, address)
try:
data = await airthings.update_device(ble_device) # type: ignore[arg-type]
data = await airthings.update_device(ble_device)
except Exception as err:
raise UpdateFailed(f"Unable to fetch data: {err}") from err