Clean up async_update_entity helper usage (#68641)

This commit is contained in:
Franck Nijhof 2022-03-25 23:22:58 +01:00 committed by GitHub
parent 53245c6523
commit d645e80ccd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 87 additions and 103 deletions

View file

@ -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)