2025-07-29 19:41:13 +02:00
|
|
|
"""Tests for the Ubiquity airOS integration."""
|
|
|
|
|
|
2026-02-25 01:02:26 +01:00
|
|
|
from airos.airos6 import AirOS6Data
|
|
|
|
|
from airos.airos8 import AirOS8Data
|
|
|
|
|
|
2025-08-08 20:34:40 +02:00
|
|
|
from homeassistant.const import Platform
|
2025-07-29 19:41:13 +02:00
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
|
2025-08-08 20:34:40 +02:00
|
|
|
from tests.common import MockConfigEntry, patch
|
2025-07-29 19:41:13 +02:00
|
|
|
|
2026-02-25 01:02:26 +01:00
|
|
|
AirOSData = AirOS8Data | AirOS6Data
|
|
|
|
|
|
2025-07-29 19:41:13 +02:00
|
|
|
|
2025-08-08 20:34:40 +02:00
|
|
|
async def setup_integration(
|
|
|
|
|
hass: HomeAssistant,
|
|
|
|
|
mock_config_entry: MockConfigEntry,
|
|
|
|
|
platforms: list[Platform] | None = None,
|
|
|
|
|
) -> None:
|
2025-07-29 19:41:13 +02:00
|
|
|
"""Fixture for setting up the component."""
|
2025-08-08 20:34:40 +02:00
|
|
|
mock_config_entry.add_to_hass(hass)
|
2025-07-29 19:41:13 +02:00
|
|
|
|
2025-08-08 20:34:40 +02:00
|
|
|
with patch("homeassistant.components.airos._PLATFORMS", platforms):
|
|
|
|
|
await hass.config_entries.async_setup(mock_config_entry.entry_id)
|
|
|
|
|
await hass.async_block_till_done()
|