mirror of
https://github.com/home-assistant/core.git
synced 2026-07-04 13:15:29 +01:00
31259725ec
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
"""Tests for the wmspro integration."""
|
|
|
|
from homeassistant.config_entries import ConfigEntry
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
|
|
async def setup_config_entry(
|
|
hass: HomeAssistant,
|
|
mock_config_entry: MockConfigEntry,
|
|
) -> bool:
|
|
"""Set up a config entry."""
|
|
mock_config_entry.add_to_hass(hass)
|
|
result = await hass.config_entries.async_setup(mock_config_entry.entry_id)
|
|
await hass.async_block_till_done()
|
|
return result
|
|
|
|
|
|
async def unload_config_entry(
|
|
hass: HomeAssistant,
|
|
config_entry: ConfigEntry,
|
|
) -> bool:
|
|
"""Unload a config entry."""
|
|
result = await hass.config_entries.async_unload(config_entry.entry_id)
|
|
await hass.async_block_till_done()
|
|
return result
|
|
|
|
|
|
async def remove_config_entry(
|
|
hass: HomeAssistant,
|
|
config_entry: ConfigEntry,
|
|
) -> dict[str, bool]:
|
|
"""Remove a config entry."""
|
|
result = await hass.config_entries.async_remove(config_entry.entry_id)
|
|
await hass.async_block_till_done()
|
|
return result
|