mirror of
https://github.com/home-assistant/core.git
synced 2026-02-22 10:55:50 +00:00
Co-authored-by: Robert Resch <robert@resch.dev> Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Joostlek <joostlek@outlook.com>
27 lines
820 B
Python
27 lines
820 B
Python
"""Tests for Proxmox VE integration."""
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
from homeassistant.helpers import entity_registry as er
|
|
|
|
from tests.common import MockConfigEntry
|
|
|
|
|
|
async def setup_integration(
|
|
hass: HomeAssistant,
|
|
config_entry: MockConfigEntry,
|
|
) -> None:
|
|
"""Set up the Proxmox VE integration for testing and enable all entities."""
|
|
config_entry.add_to_hass(hass)
|
|
await hass.config_entries.async_setup(config_entry.entry_id)
|
|
await hass.async_block_till_done()
|
|
|
|
entity_registry = er.async_get(hass)
|
|
|
|
for entry in er.async_entries_for_config_entry(
|
|
entity_registry, config_entry.entry_id
|
|
):
|
|
if entry.disabled_by is not None:
|
|
entity_registry.async_update_entity(entry.entity_id, disabled_by=None)
|
|
|
|
await hass.async_block_till_done()
|