Bump sensorpush-ble to 1.8.0 (#143794)

* Bump sensorpush-ble to 1.8.0

changelog: https://github.com/Bluetooth-Devices/sensorpush-ble/compare/v1.7.1...v1.8.0

* fix tests
This commit is contained in:
J. Nick Koston 2025-04-28 01:33:11 -05:00 committed by GitHub
parent 9ec174776c
commit c3996d6931
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 48 additions and 8 deletions

View File

@ -17,5 +17,5 @@
"dependencies": ["bluetooth_adapters"],
"documentation": "https://www.home-assistant.io/integrations/sensorpush",
"iot_class": "local_push",
"requirements": ["sensorpush-ble==1.7.1"]
"requirements": ["sensorpush-ble==1.8.0"]
}

2
requirements_all.txt generated
View File

@ -2725,7 +2725,7 @@ sensorpro-ble==0.5.3
sensorpush-api==2.1.2
# homeassistant.components.sensorpush
sensorpush-ble==1.7.1
sensorpush-ble==1.8.0
# homeassistant.components.sensorpush_cloud
sensorpush-ha==1.3.2

View File

@ -2205,7 +2205,7 @@ sensorpro-ble==0.5.3
sensorpush-api==2.1.2
# homeassistant.components.sensorpush
sensorpush-ble==1.7.1
sensorpush-ble==1.8.0
# homeassistant.components.sensorpush_cloud
sensorpush-ha==1.3.2

View File

@ -1,8 +1,48 @@
"""Tests for the SensorPush integration."""
from homeassistant.helpers.service_info.bluetooth import BluetoothServiceInfo
from uuid import UUID
NOT_SENSOR_PUSH_SERVICE_INFO = BluetoothServiceInfo(
from bleak.backends.device import BLEDevice
from bluetooth_data_tools import monotonic_time_coarse
from homeassistant.components.bluetooth import BluetoothServiceInfoBleak
def make_bluetooth_service_info(
name: str,
manufacturer_data: dict[int, bytes],
service_uuids: list[str],
address: str,
rssi: int,
service_data: dict[UUID, bytes],
source: str,
tx_power: int = 0,
raw: bytes | None = None,
) -> BluetoothServiceInfoBleak:
"""Create a BluetoothServiceInfoBleak object for testing."""
return BluetoothServiceInfoBleak(
name=name,
manufacturer_data=manufacturer_data,
service_uuids=service_uuids,
address=address,
rssi=rssi,
service_data=service_data,
source=source,
device=BLEDevice(
name=name,
address=address,
details={},
rssi=rssi,
),
time=monotonic_time_coarse(),
advertisement=None,
connectable=True,
tx_power=tx_power,
raw=raw,
)
NOT_SENSOR_PUSH_SERVICE_INFO = make_bluetooth_service_info(
name="Not it",
address="61DE521B-F0BF-9F44-64D4-75BBE1738105",
rssi=-63,
@ -12,7 +52,7 @@ NOT_SENSOR_PUSH_SERVICE_INFO = BluetoothServiceInfo(
source="local",
)
HTW_SERVICE_INFO = BluetoothServiceInfo(
HTW_SERVICE_INFO = make_bluetooth_service_info(
name="SensorPush HT.w 0CA1",
address="61DE521B-F0BF-9F44-64D4-75BBE1738105",
rssi=-63,
@ -22,7 +62,7 @@ HTW_SERVICE_INFO = BluetoothServiceInfo(
source="local",
)
HTPWX_SERVICE_INFO = BluetoothServiceInfo(
HTPWX_SERVICE_INFO = make_bluetooth_service_info(
name="SensorPush HTP.xw F4D",
address="4125DDBA-2774-4851-9889-6AADDD4CAC3D",
rssi=-56,
@ -33,7 +73,7 @@ HTPWX_SERVICE_INFO = BluetoothServiceInfo(
)
HTPWX_EMPTY_SERVICE_INFO = BluetoothServiceInfo(
HTPWX_EMPTY_SERVICE_INFO = make_bluetooth_service_info(
name="SensorPush HTP.xw F4D",
address="4125DDBA-2774-4851-9889-6AADDD4CAC3D",
rssi=-56,