From 2f634ad6fd67407bbabb43e684106e1f3378b426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Mind=C3=AAllo=20de=20Andrade?= Date: Fri, 31 Jul 2026 19:36:39 -0300 Subject: [PATCH] Limit scope to only climate entities on Midea tests (#177902) --- tests/components/midea/test_climate.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/components/midea/test_climate.py b/tests/components/midea/test_climate.py index 14053f2c5e61..6aa60b4ab7e9 100644 --- a/tests/components/midea/test_climate.py +++ b/tests/components/midea/test_climate.py @@ -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)