* Add switch platform * Add mypulink switch platform * Update tests according to review * Address more review comments * Adjust types * More typing * Fix typo * Use constants in tests * Revert constants * Catch aiohttp.ClientError when API call fails * Add test case for failed async_set_device_points call * Test api failures for both toggle directions * Use parametrize for testing switching
12 lines
370 B
Python
12 lines
370 B
Python
"""Tests for the myuplink integration."""
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
|
|
async def setup_integration(hass: HomeAssistant, config_entry: MockConfigEntry) -> None:
|
|
"""Fixture for setting up the component."""
|
|
config_entry.add_to_hass(hass)
|
|
|
|
await hass.config_entries.async_setup(config_entry.entry_id)
|