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:
Lennard Beers 2024-03-29 02:20:56 +01:00 committed by GitHub
parent 4adbf7c730
commit 282cbfc048
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 965 additions and 1 deletions

View 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=(),
),
)