mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
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:
parent
592dcec852
commit
e6b88ec087
@ -24,5 +24,5 @@
|
|||||||
"dependencies": ["bluetooth_adapters"],
|
"dependencies": ["bluetooth_adapters"],
|
||||||
"documentation": "https://www.home-assistant.io/integrations/thermopro",
|
"documentation": "https://www.home-assistant.io/integrations/thermopro",
|
||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"requirements": ["thermopro-ble==0.11.0"]
|
"requirements": ["thermopro-ble==0.12.0"]
|
||||||
}
|
}
|
||||||
|
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@ -2909,7 +2909,7 @@ tessie-api==0.1.1
|
|||||||
thermobeacon-ble==0.9.0
|
thermobeacon-ble==0.9.0
|
||||||
|
|
||||||
# homeassistant.components.thermopro
|
# homeassistant.components.thermopro
|
||||||
thermopro-ble==0.11.0
|
thermopro-ble==0.12.0
|
||||||
|
|
||||||
# homeassistant.components.thingspeak
|
# homeassistant.components.thingspeak
|
||||||
thingspeak==1.0.0
|
thingspeak==1.0.0
|
||||||
|
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@ -2347,7 +2347,7 @@ tessie-api==0.1.1
|
|||||||
thermobeacon-ble==0.9.0
|
thermobeacon-ble==0.9.0
|
||||||
|
|
||||||
# homeassistant.components.thermopro
|
# homeassistant.components.thermopro
|
||||||
thermopro-ble==0.11.0
|
thermopro-ble==0.12.0
|
||||||
|
|
||||||
# homeassistant.components.lg_thinq
|
# homeassistant.components.lg_thinq
|
||||||
thinqconnect==1.0.5
|
thinqconnect==1.0.5
|
||||||
|
@ -1,8 +1,48 @@
|
|||||||
"""Tests for the ThermoPro integration."""
|
"""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",
|
name="Not it",
|
||||||
address="61DE521B-F0BF-9F44-64D4-75BBE1738105",
|
address="61DE521B-F0BF-9F44-64D4-75BBE1738105",
|
||||||
rssi=-63,
|
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)",
|
name="TP357 (2142)",
|
||||||
manufacturer_data={61890: b"\x00\x1d\x02,"},
|
manufacturer_data={61890: b"\x00\x1d\x02,"},
|
||||||
service_uuids=[],
|
service_uuids=[],
|
||||||
@ -23,7 +63,7 @@ TP357_SERVICE_INFO = BluetoothServiceInfo(
|
|||||||
source="local",
|
source="local",
|
||||||
)
|
)
|
||||||
|
|
||||||
TP358_SERVICE_INFO = BluetoothServiceInfo(
|
TP358_SERVICE_INFO = make_bluetooth_service_info(
|
||||||
name="TP358 (4221)",
|
name="TP358 (4221)",
|
||||||
manufacturer_data={61890: b"\x00\x1d\x02,"},
|
manufacturer_data={61890: b"\x00\x1d\x02,"},
|
||||||
service_uuids=[],
|
service_uuids=[],
|
||||||
@ -33,7 +73,7 @@ TP358_SERVICE_INFO = BluetoothServiceInfo(
|
|||||||
source="local",
|
source="local",
|
||||||
)
|
)
|
||||||
|
|
||||||
TP962R_SERVICE_INFO = BluetoothServiceInfo(
|
TP962R_SERVICE_INFO = make_bluetooth_service_info(
|
||||||
name="TP962R (0000)",
|
name="TP962R (0000)",
|
||||||
manufacturer_data={14081: b"\x00;\x0b7\x00"},
|
manufacturer_data={14081: b"\x00;\x0b7\x00"},
|
||||||
service_uuids=["72fbb631-6f6b-d1ba-db55-2ee6fdd942bd"],
|
service_uuids=["72fbb631-6f6b-d1ba-db55-2ee6fdd942bd"],
|
||||||
@ -43,7 +83,7 @@ TP962R_SERVICE_INFO = BluetoothServiceInfo(
|
|||||||
source="local",
|
source="local",
|
||||||
)
|
)
|
||||||
|
|
||||||
TP962R_SERVICE_INFO_2 = BluetoothServiceInfo(
|
TP962R_SERVICE_INFO_2 = make_bluetooth_service_info(
|
||||||
name="TP962R (0000)",
|
name="TP962R (0000)",
|
||||||
manufacturer_data={17152: b"\x00\x17\nC\x00", 14081: b"\x00;\x0b7\x00"},
|
manufacturer_data={17152: b"\x00\x17\nC\x00", 14081: b"\x00;\x0b7\x00"},
|
||||||
service_uuids=["72fbb631-6f6b-d1ba-db55-2ee6fdd942bd"],
|
service_uuids=["72fbb631-6f6b-d1ba-db55-2ee6fdd942bd"],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user