mirror of
https://github.com/home-assistant/core.git
synced 2025-04-19 14:57:52 +00:00
Use entity_registry_enabled_by_default fixture in devolo Home Network (#143108)
This commit is contained in:
parent
21fabd3afa
commit
3c1d93f503
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user