diff --git a/homeassistant/components/automation/__init__.py b/homeassistant/components/automation/__init__.py index 4d2cbcc94d2..3cbb98d85bd 100644 --- a/homeassistant/components/automation/__init__.py +++ b/homeassistant/components/automation/__init__.py @@ -35,7 +35,7 @@ from homeassistant.helpers.script import ( ATTR_MAX, ATTR_MODE, CONF_MAX, - SCRIPT_MODE_PARALLEL, + SCRIPT_MODE_SINGLE, Script, make_script_schema, ) @@ -118,7 +118,7 @@ PLATFORM_SCHEMA = vol.All( vol.Optional(CONF_CONDITION): _CONDITION_SCHEMA, vol.Required(CONF_ACTION): cv.SCRIPT_SCHEMA, }, - SCRIPT_MODE_PARALLEL, + SCRIPT_MODE_SINGLE, ), ) diff --git a/tests/components/automation/test_numeric_state.py b/tests/components/automation/test_numeric_state.py index 11a4477f658..e4180ad2e6c 100644 --- a/tests/components/automation/test_numeric_state.py +++ b/tests/components/automation/test_numeric_state.py @@ -853,7 +853,7 @@ async def test_if_not_fires_on_entities_change_with_for_after_stop(hass, calls): await hass.async_block_till_done() async_fire_time_changed(hass, dt_util.utcnow() + timedelta(seconds=10)) await hass.async_block_till_done() - assert len(calls) == 2 + assert len(calls) == 1 hass.states.async_set("test.entity_1", 15) hass.states.async_set("test.entity_2", 15) @@ -866,7 +866,7 @@ async def test_if_not_fires_on_entities_change_with_for_after_stop(hass, calls): async_fire_time_changed(hass, dt_util.utcnow() + timedelta(seconds=10)) await hass.async_block_till_done() - assert len(calls) == 2 + assert len(calls) == 1 async def test_if_fires_on_entity_change_with_for_attribute_change(hass, calls): diff --git a/tests/components/automation/test_state.py b/tests/components/automation/test_state.py index 18a2750cb50..13165da8488 100644 --- a/tests/components/automation/test_state.py +++ b/tests/components/automation/test_state.py @@ -404,7 +404,7 @@ async def test_if_not_fires_on_entities_change_with_for_after_stop(hass, calls): await hass.async_block_till_done() async_fire_time_changed(hass, dt_util.utcnow() + timedelta(seconds=10)) await hass.async_block_till_done() - assert len(calls) == 2 + assert len(calls) == 1 hass.states.async_set("test.entity_1", "world_no") hass.states.async_set("test.entity_2", "world_no") @@ -417,7 +417,7 @@ async def test_if_not_fires_on_entities_change_with_for_after_stop(hass, calls): async_fire_time_changed(hass, dt_util.utcnow() + timedelta(seconds=10)) await hass.async_block_till_done() - assert len(calls) == 2 + assert len(calls) == 1 async def test_if_fires_on_entity_change_with_for_attribute_change(hass, calls):