"""The water heater tests for the tado platform.""" from collections.abc import AsyncGenerator from unittest.mock import patch import pytest from syrupy.assertion import SnapshotAssertion from homeassistant.components.tado import DOMAIN from homeassistant.const import Platform from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_registry as er from .util import async_init_integration from tests.common import MockConfigEntry, snapshot_platform @pytest.fixture(autouse=True) def setup_platforms() -> AsyncGenerator[None]: """Set up the platforms for the tests.""" with patch("homeassistant.components.tado.PLATFORMS", [Platform.WATER_HEATER]): yield async def test_entities( hass: HomeAssistant, entity_registry: er.EntityRegistry, snapshot: SnapshotAssertion ) -> None: """Test creation of water heater.""" await async_init_integration(hass) config_entry: MockConfigEntry = hass.config_entries.async_entries(DOMAIN)[0] await snapshot_platform(hass, entity_registry, snapshot, config_entry.entry_id)