Revert "Deprecate timer start optional duration parameter" (#99613)
Revert "Deprecate timer start optional duration parameter (#93471)"
This reverts commit 2ce5b08fc3
.
This commit is contained in:
parent
e57ed26896
commit
26fd36dc4c
3 changed files with 2 additions and 40 deletions
|
@ -46,11 +46,7 @@ from homeassistant.const import (
|
|||
)
|
||||
from homeassistant.core import Context, CoreState, HomeAssistant, State
|
||||
from homeassistant.exceptions import HomeAssistantError, Unauthorized
|
||||
from homeassistant.helpers import (
|
||||
config_validation as cv,
|
||||
entity_registry as er,
|
||||
issue_registry as ir,
|
||||
)
|
||||
from homeassistant.helpers import config_validation as cv, entity_registry as er
|
||||
from homeassistant.helpers.restore_state import StoredState, async_get
|
||||
from homeassistant.setup import async_setup_component
|
||||
from homeassistant.util.dt import utcnow
|
||||
|
@ -270,9 +266,7 @@ async def test_methods_and_events(hass: HomeAssistant) -> None:
|
|||
|
||||
|
||||
@pytest.mark.freeze_time("2023-06-05 17:47:50")
|
||||
async def test_start_service(
|
||||
hass: HomeAssistant, issue_registry: ir.IssueRegistry
|
||||
) -> None:
|
||||
async def test_start_service(hass: HomeAssistant) -> None:
|
||||
"""Test the start/stop service."""
|
||||
await async_setup_component(hass, DOMAIN, {DOMAIN: {"test1": {CONF_DURATION: 10}}})
|
||||
|
||||
|
@ -317,12 +311,6 @@ async def test_start_service(
|
|||
blocking=True,
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
# Ensure an issue is raised for the use of this deprecated service
|
||||
assert issue_registry.async_get_issue(
|
||||
domain=DOMAIN, issue_id="deprecated_duration_in_start"
|
||||
)
|
||||
|
||||
state = hass.states.get("timer.test1")
|
||||
assert state
|
||||
assert state.state == STATUS_ACTIVE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue