mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 23:41:48 -05:00
Limit scope to only climate entities on Midea tests (#177902)
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
from collections.abc import Callable
|
||||
from typing import Any
|
||||
from unittest.mock import patch
|
||||
|
||||
from midealocal.const import DeviceType
|
||||
from midealocal.devices.ac import DeviceAttributes as ACAttributes
|
||||
@@ -44,7 +45,7 @@ from homeassistant.components.climate import (
|
||||
HVACMode,
|
||||
)
|
||||
from homeassistant.components.midea.climate import FAN_FULL_SPEED, FAN_SILENT
|
||||
from homeassistant.const import ATTR_ENTITY_ID
|
||||
from homeassistant.const import ATTR_ENTITY_ID, Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.exceptions import ServiceValidationError
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
@@ -1460,6 +1461,7 @@ async def test_climate_state_snapshot(
|
||||
) -> None:
|
||||
"""Test async_setup_entry creates entities for each device type."""
|
||||
config_entry = mock_config_entry(device)
|
||||
await setup_integration(hass, config_entry, device)
|
||||
with patch("homeassistant.components.midea._PLATFORMS", [Platform.CLIMATE]):
|
||||
await setup_integration(hass, config_entry, device)
|
||||
|
||||
await snapshot_platform(hass, entity_registry, snapshot, config_entry.entry_id)
|
||||
await snapshot_platform(hass, entity_registry, snapshot, config_entry.entry_id)
|
||||
|
||||
Reference in New Issue
Block a user