Bump airthings_ble to 0.7.1 (#113172)
Co-authored-by: Ståle Storø Hauknes <LaStrada@users.noreply.github.com>
This commit is contained in:
parent
45fb5bcb42
commit
d2bd68ba30
7 changed files with 15 additions and 17 deletions
|
@ -28,7 +28,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
hass.data.setdefault(DOMAIN, {})
|
||||
address = entry.unique_id
|
||||
|
||||
elevation = hass.config.elevation
|
||||
is_metric = hass.config.units is METRIC_SYSTEM
|
||||
assert address is not None
|
||||
|
||||
|
@ -41,7 +40,7 @@ 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)
|
||||
airthings = AirthingsBluetoothDeviceData(_LOGGER, is_metric)
|
||||
|
||||
async def _async_update_method() -> AirthingsDevice:
|
||||
"""Get data from Airthings BLE."""
|
||||
|
|
|
@ -24,5 +24,5 @@
|
|||
"dependencies": ["bluetooth_adapters"],
|
||||
"documentation": "https://www.home-assistant.io/integrations/airthings_ble",
|
||||
"iot_class": "local_polling",
|
||||
"requirements": ["airthings-ble==0.6.1"]
|
||||
"requirements": ["airthings-ble==0.7.1"]
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ from homeassistant.config_entries import ConfigEntry
|
|||
from homeassistant.const import (
|
||||
CONCENTRATION_PARTS_PER_BILLION,
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
LIGHT_LUX,
|
||||
PERCENTAGE,
|
||||
EntityCategory,
|
||||
Platform,
|
||||
|
@ -109,8 +108,7 @@ SENSORS_MAPPING_TEMPLATE: dict[str, SensorEntityDescription] = {
|
|||
),
|
||||
"illuminance": SensorEntityDescription(
|
||||
key="illuminance",
|
||||
device_class=SensorDeviceClass.ILLUMINANCE,
|
||||
native_unit_of_measurement=LIGHT_LUX,
|
||||
native_unit_of_measurement=PERCENTAGE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
}
|
||||
|
@ -226,7 +224,7 @@ class AirthingsSensor(
|
|||
manufacturer=airthings_device.manufacturer,
|
||||
hw_version=airthings_device.hw_version,
|
||||
sw_version=airthings_device.sw_version,
|
||||
model=airthings_device.model,
|
||||
model=airthings_device.model.name,
|
||||
)
|
||||
|
||||
@property
|
||||
|
|
|
@ -416,7 +416,7 @@ aioymaps==1.2.2
|
|||
airly==1.1.0
|
||||
|
||||
# homeassistant.components.airthings_ble
|
||||
airthings-ble==0.6.1
|
||||
airthings-ble==0.7.1
|
||||
|
||||
# homeassistant.components.airthings
|
||||
airthings-cloud==0.2.0
|
||||
|
|
|
@ -389,7 +389,7 @@ aioymaps==1.2.2
|
|||
airly==1.1.0
|
||||
|
||||
# homeassistant.components.airthings_ble
|
||||
airthings-ble==0.6.1
|
||||
airthings-ble==0.7.1
|
||||
|
||||
# homeassistant.components.airthings
|
||||
airthings-cloud==0.2.0
|
||||
|
|
|
@ -4,7 +4,11 @@ from __future__ import annotations
|
|||
|
||||
from unittest.mock import patch
|
||||
|
||||
from airthings_ble import AirthingsBluetoothDeviceData, AirthingsDevice
|
||||
from airthings_ble import (
|
||||
AirthingsBluetoothDeviceData,
|
||||
AirthingsDevice,
|
||||
AirthingsDeviceType,
|
||||
)
|
||||
|
||||
from homeassistant.components.airthings_ble.const import DOMAIN
|
||||
from homeassistant.components.bluetooth.models import BluetoothServiceInfoBleak
|
||||
|
@ -162,8 +166,7 @@ WAVE_DEVICE_INFO = AirthingsDevice(
|
|||
manufacturer="Airthings AS",
|
||||
hw_version="REV A",
|
||||
sw_version="G-BLE-1.5.3-master+0",
|
||||
model="Wave Plus",
|
||||
model_raw="2930",
|
||||
model=AirthingsDeviceType.WAVE_PLUS,
|
||||
name="Airthings Wave+",
|
||||
identifier="123456",
|
||||
sensors={
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
from unittest.mock import patch
|
||||
|
||||
from airthings_ble import AirthingsDevice
|
||||
from airthings_ble import AirthingsDevice, AirthingsDeviceType
|
||||
from bleak import BleakError
|
||||
|
||||
from homeassistant.components.airthings_ble.const import DOMAIN
|
||||
|
@ -29,8 +29,7 @@ async def test_bluetooth_discovery(hass: HomeAssistant) -> None:
|
|||
with patch_async_ble_device_from_address(WAVE_SERVICE_INFO), patch_airthings_ble(
|
||||
AirthingsDevice(
|
||||
manufacturer="Airthings AS",
|
||||
model="Wave Plus",
|
||||
model_raw="2930",
|
||||
model=AirthingsDeviceType.WAVE_PLUS,
|
||||
name="Airthings Wave Plus",
|
||||
identifier="123456",
|
||||
)
|
||||
|
@ -112,8 +111,7 @@ async def test_user_setup(hass: HomeAssistant) -> None:
|
|||
), patch_async_ble_device_from_address(WAVE_SERVICE_INFO), patch_airthings_ble(
|
||||
AirthingsDevice(
|
||||
manufacturer="Airthings AS",
|
||||
model="Wave Plus",
|
||||
model_raw="2930",
|
||||
model=AirthingsDeviceType.WAVE_PLUS,
|
||||
name="Airthings Wave Plus",
|
||||
identifier="123456",
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue