Bump thermopro-ble to 0.12.0 (#143799)

* Bump thermopro-ble to 0.12.0

changelog: https://github.com/Bluetooth-Devices/thermopro-ble/compare/v0.11.0...v0.12.0

* update tests
This commit is contained in:
J. Nick Koston 2025-04-28 01:37:20 -05:00 committed by GitHub
parent 592dcec852
commit e6b88ec087
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 49 additions and 9 deletions

View File

@ -24,5 +24,5 @@
"dependencies": ["bluetooth_adapters"],
"documentation": "https://www.home-assistant.io/integrations/thermopro",
"iot_class": "local_push",
"requirements": ["thermopro-ble==0.11.0"]
"requirements": ["thermopro-ble==0.12.0"]
}

2
requirements_all.txt generated
View File

@ -2909,7 +2909,7 @@ tessie-api==0.1.1
thermobeacon-ble==0.9.0
# homeassistant.components.thermopro
thermopro-ble==0.11.0
thermopro-ble==0.12.0
# homeassistant.components.thingspeak
thingspeak==1.0.0

View File

@ -2347,7 +2347,7 @@ tessie-api==0.1.1
thermobeacon-ble==0.9.0
# homeassistant.components.thermopro
thermopro-ble==0.11.0
thermopro-ble==0.12.0
# homeassistant.components.lg_thinq
thinqconnect==1.0.5

View File

@ -1,8 +1,48 @@
"""Tests for the ThermoPro integration."""
from homeassistant.helpers.service_info.bluetooth import BluetoothServiceInfo
from uuid import UUID
NOT_THERMOPRO_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_THERMOPRO_SERVICE_INFO = make_bluetooth_service_info(
name="Not it",
address="61DE521B-F0BF-9F44-64D4-75BBE1738105",
rssi=-63,
@ -13,7 +53,7 @@ NOT_THERMOPRO_SERVICE_INFO = BluetoothServiceInfo(
)
TP357_SERVICE_INFO = BluetoothServiceInfo(
TP357_SERVICE_INFO = make_bluetooth_service_info(
name="TP357 (2142)",
manufacturer_data={61890: b"\x00\x1d\x02,"},
service_uuids=[],
@ -23,7 +63,7 @@ TP357_SERVICE_INFO = BluetoothServiceInfo(
source="local",
)
TP358_SERVICE_INFO = BluetoothServiceInfo(
TP358_SERVICE_INFO = make_bluetooth_service_info(
name="TP358 (4221)",
manufacturer_data={61890: b"\x00\x1d\x02,"},
service_uuids=[],
@ -33,7 +73,7 @@ TP358_SERVICE_INFO = BluetoothServiceInfo(
source="local",
)
TP962R_SERVICE_INFO = BluetoothServiceInfo(
TP962R_SERVICE_INFO = make_bluetooth_service_info(
name="TP962R (0000)",
manufacturer_data={14081: b"\x00;\x0b7\x00"},
service_uuids=["72fbb631-6f6b-d1ba-db55-2ee6fdd942bd"],
@ -43,7 +83,7 @@ TP962R_SERVICE_INFO = BluetoothServiceInfo(
source="local",
)
TP962R_SERVICE_INFO_2 = BluetoothServiceInfo(
TP962R_SERVICE_INFO_2 = make_bluetooth_service_info(
name="TP962R (0000)",
manufacturer_data={17152: b"\x00\x17\nC\x00", 14081: b"\x00;\x0b7\x00"},
service_uuids=["72fbb631-6f6b-d1ba-db55-2ee6fdd942bd"],