Add eq3btsmart integration (#109291)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
4adbf7c730
commit
282cbfc048
23 changed files with 965 additions and 1 deletions
41
tests/components/eq3btsmart/conftest.py
Normal file
41
tests/components/eq3btsmart/conftest.py
Normal file
|
@ -0,0 +1,41 @@
|
|||
"""Fixtures for eq3btsmart tests."""
|
||||
|
||||
from bleak.backends.scanner import AdvertisementData
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.bluetooth import BluetoothServiceInfoBleak
|
||||
|
||||
from .const import MAC
|
||||
|
||||
from tests.components.bluetooth import generate_ble_device
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def mock_bluetooth(enable_bluetooth):
|
||||
"""Auto mock bluetooth."""
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def fake_service_info():
|
||||
"""Return a BluetoothServiceInfoBleak for use in testing."""
|
||||
return BluetoothServiceInfoBleak(
|
||||
name="CC-RT-BLE",
|
||||
address=MAC,
|
||||
rssi=0,
|
||||
manufacturer_data={},
|
||||
service_data={},
|
||||
service_uuids=[],
|
||||
source="local",
|
||||
connectable=False,
|
||||
time=0,
|
||||
device=generate_ble_device(address=MAC, name="CC-RT-BLE", rssi=0),
|
||||
advertisement=AdvertisementData(
|
||||
local_name="CC-RT-BLE",
|
||||
manufacturer_data={},
|
||||
service_data={},
|
||||
service_uuids=[],
|
||||
rssi=0,
|
||||
tx_power=-127,
|
||||
platform_data=(),
|
||||
),
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue