mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Clean up async_update_entity helper usage (#68641)
This commit is contained in:
@@ -16,6 +16,7 @@ from homeassistant.const import (
|
||||
SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
|
||||
TEMP_CELSIUS,
|
||||
)
|
||||
from homeassistant.helpers.entity_component import async_update_entity
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.util.dt import utcnow
|
||||
|
||||
@@ -126,7 +127,7 @@ async def test_sensors_attributes_pro(hass, canary) -> None:
|
||||
|
||||
future = utcnow() + timedelta(seconds=30)
|
||||
async_fire_time_changed(hass, future)
|
||||
await hass.helpers.entity_component.async_update_entity(entity_id)
|
||||
await async_update_entity(hass, entity_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
state2 = hass.states.get(entity_id)
|
||||
@@ -142,7 +143,7 @@ async def test_sensors_attributes_pro(hass, canary) -> None:
|
||||
|
||||
future += timedelta(seconds=30)
|
||||
async_fire_time_changed(hass, future)
|
||||
await hass.helpers.entity_component.async_update_entity(entity_id)
|
||||
await async_update_entity(hass, entity_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
state3 = hass.states.get(entity_id)
|
||||
|
||||
Reference in New Issue
Block a user