diff --git a/homeassistant/components/airthings_ble/__init__.py b/homeassistant/components/airthings_ble/__init__.py index 1d62442f14de1de40cc2398629af9efa48d2fd1a..3a97813741b42ca158375111ebeb60a1400a00d3 100644 --- a/homeassistant/components/airthings_ble/__init__.py +++ b/homeassistant/components/airthings_ble/__init__.py @@ -40,10 +40,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: f"Could not find Airthings device with address {address}" ) + airthings = AirthingsBluetoothDeviceData(_LOGGER, elevation, is_metric) + async def _async_update_method() -> AirthingsDevice: """Get data from Airthings BLE.""" ble_device = bluetooth.async_ble_device_from_address(hass, address) - airthings = AirthingsBluetoothDeviceData(_LOGGER, elevation, is_metric) try: data = await airthings.update_device(ble_device) # type: ignore[arg-type] diff --git a/homeassistant/components/airthings_ble/manifest.json b/homeassistant/components/airthings_ble/manifest.json index cb7114ff8ff7153beb0c77cd29dcc58d0d966f3e..03b42410d66e95fbb142997a2929d3e0474cb9bc 100644 --- a/homeassistant/components/airthings_ble/manifest.json +++ b/homeassistant/components/airthings_ble/manifest.json @@ -24,5 +24,5 @@ "dependencies": ["bluetooth_adapters"], "documentation": "https://www.home-assistant.io/integrations/airthings_ble", "iot_class": "local_polling", - "requirements": ["airthings-ble==0.5.6-2"] + "requirements": ["airthings-ble==0.6.0"] } diff --git a/requirements_all.txt b/requirements_all.txt index cd43f8a13394cbbb9541ca58f4877590c7eda935..e5186226dffe791efdac2e80bf4360568d49741d 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -407,7 +407,7 @@ aioymaps==1.2.2 airly==1.1.0 # homeassistant.components.airthings_ble -airthings-ble==0.5.6-2 +airthings-ble==0.6.0 # homeassistant.components.airthings airthings-cloud==0.2.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index a2618222da8aeec833eb66ac8b7a9ed71f1b2d10..e46d1241e86b21ea4ed0c53f3291af9875517baf 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -380,7 +380,7 @@ aioymaps==1.2.2 airly==1.1.0 # homeassistant.components.airthings_ble -airthings-ble==0.5.6-2 +airthings-ble==0.6.0 # homeassistant.components.airthings airthings-cloud==0.2.0