Clean up async_reproduce_state helper usage (#68617)
This commit is contained in:
parent
cbf5b5ead5
commit
8aff8d89d2
22 changed files with 159 additions and 126 deletions
|
@ -1,5 +1,6 @@
|
|||
"""Test reproduce state for input boolean."""
|
||||
from homeassistant.core import State
|
||||
from homeassistant.helpers.state import async_reproduce_state
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
|
||||
|
@ -15,7 +16,8 @@ async def test_reproducing_states(hass):
|
|||
}
|
||||
},
|
||||
)
|
||||
await hass.helpers.state.async_reproduce_state(
|
||||
await async_reproduce_state(
|
||||
hass,
|
||||
[
|
||||
State("input_boolean.initial_on", "off"),
|
||||
State("input_boolean.initial_off", "on"),
|
||||
|
@ -26,7 +28,8 @@ async def test_reproducing_states(hass):
|
|||
assert hass.states.get("input_boolean.initial_off").state == "on"
|
||||
assert hass.states.get("input_boolean.initial_on").state == "off"
|
||||
|
||||
await hass.helpers.state.async_reproduce_state(
|
||||
await async_reproduce_state(
|
||||
hass,
|
||||
[
|
||||
# Test invalid state
|
||||
State("input_boolean.initial_on", "invalid_state"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue