Use entity_registry_enabled_by_default fixture in devolo Home Network (#143108)

This commit is contained in:
Guido Schmitz 2025-04-16 21:12:50 +02:00 committed by GitHub
parent 21fabd3afa
commit 3c1d93f503
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,7 @@ from unittest.mock import AsyncMock
from devolo_plc_api.exceptions.device import DeviceUnavailable
from freezegun.api import FrozenDateTimeFactory
import pytest
from syrupy.assertion import SnapshotAssertion
from homeassistant.components.device_tracker import DOMAIN as PLATFORM
@ -25,6 +26,7 @@ STATION = CONNECTED_STATIONS[0]
SERIAL = DISCOVERY_INFO.properties["SN"]
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
async def test_device_tracker(
hass: HomeAssistant,
mock_device: MockDevice,
@ -42,14 +44,6 @@ async def test_device_tracker(
freezer.tick(LONG_UPDATE_INTERVAL)
async_fire_time_changed(hass)
await hass.async_block_till_done()
# Enable entity
entity_registry.async_update_entity(state_key, disabled_by=None)
await hass.async_block_till_done()
freezer.tick(LONG_UPDATE_INTERVAL)
async_fire_time_changed(hass)
await hass.async_block_till_done()
assert hass.states.get(state_key) == snapshot
# Emulate state change