Convert template alarm_control_panel to use async_track_template_result (#39014)

* Convert template lock to use async_track_template_result

* Convert template switch to use async_track_template_result

* Convert template fan to use async_track_template_result

* Convert template alarm_control_panel to use async_track_template_result
This commit is contained in:
J. Nick Koston authored and GitHub committed 2020-08-20 08:54:16 -05:00
1 parent f3d077c1e1
commit 8813f669c2
2 files changed
+33 -70

No files matched your search

@@ -148,6 +148,7 @@ async def test_optimistic_states(hass):
await common.async_alarm_arm_away(
hass, entity_id="alarm_control_panel.test_template_panel"
)
await hass.async_block_till_done()
state = hass.states.get("alarm_control_panel.test_template_panel")
await hass.async_block_till_done()
assert state.state == STATE_ALARM_ARMED_AWAY
@@ -201,6 +202,7 @@ async def test_no_action_scripts(hass):
await common.async_alarm_arm_away(
hass, entity_id="alarm_control_panel.test_template_panel"
)
await hass.async_block_till_done()
state = hass.states.get("alarm_control_panel.test_template_panel")
await hass.async_block_till_done()
assert state.state == STATE_ALARM_ARMED_AWAY
@@ -208,6 +210,7 @@ async def test_no_action_scripts(hass):
await common.async_alarm_arm_home(
hass, entity_id="alarm_control_panel.test_template_panel"
)
await hass.async_block_till_done()
state = hass.states.get("alarm_control_panel.test_template_panel")
await hass.async_block_till_done()
assert state.state == STATE_ALARM_ARMED_AWAY
@@ -215,6 +218,7 @@ async def test_no_action_scripts(hass):
await common.async_alarm_arm_night(
hass, entity_id="alarm_control_panel.test_template_panel"
)
await hass.async_block_till_done()
state = hass.states.get("alarm_control_panel.test_template_panel")
await hass.async_block_till_done()
assert state.state == STATE_ALARM_ARMED_AWAY
@@ -222,6 +226,7 @@ async def test_no_action_scripts(hass):
await common.async_alarm_disarm(
hass, entity_id="alarm_control_panel.test_template_panel"
)
await hass.async_block_till_done()
state = hass.states.get("alarm_control_panel.test_template_panel")
await hass.async_block_till_done()
assert state.state == STATE_ALARM_ARMED_AWAY