mirror of
https://github.com/home-assistant/core.git
synced 2025-12-25 05:26:47 +00:00
Clean up async_reproduce_state helper usage (#68617)
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user