Add device trackers to enabled_by_default fixture (#134446)

This commit is contained in:
Josef Zweck 2025-01-06 22:03:32 +01:00 committed by GitHub
parent 4eb23f3039
commit a47fa08a9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,9 +74,15 @@ def prevent_io() -> Generator[None]:
@pytest.fixture
def entity_registry_enabled_by_default() -> Generator[None]:
"""Test fixture that ensures all entities are enabled in the registry."""
with patch(
"homeassistant.helpers.entity.Entity.entity_registry_enabled_default",
return_value=True,
with (
patch(
"homeassistant.helpers.entity.Entity.entity_registry_enabled_default",
return_value=True,
),
patch(
"homeassistant.components.device_tracker.config_entry.ScannerEntity.entity_registry_enabled_default",
return_value=True,
),
):
yield