Avoid use of hass.helpers in plugwise test (#114534)

This commit is contained in:
Jan-Philipp Benecke 2024-04-01 00:41:47 +02:00 committed by GitHub
parent 0238c2ea9e
commit ecf286cd81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,7 @@ from unittest.mock import MagicMock
from homeassistant.const import STATE_OFF, STATE_ON
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_component import async_update_entity
from tests.common import MockConfigEntry
@ -45,9 +46,7 @@ async def test_anna_climate_binary_sensor_change(
assert state
assert state.state == STATE_ON
await hass.helpers.entity_component.async_update_entity(
"binary_sensor.opentherm_dhw_state"
)
await async_update_entity(hass, "binary_sensor.opentherm_dhw_state")
state = hass.states.get("binary_sensor.opentherm_dhw_state")
assert state