Clean up async_update_entity helper usage (#68641)
This commit is contained in:
parent
53245c6523
commit
d645e80ccd
23 changed files with 87 additions and 103 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue