Raise ConditionError for time errors (#46250)
This commit is contained in:
committed by
GitHub
parent
5ce49c62b1
commit
888c9e120d
@@ -334,8 +334,11 @@ async def test_time_using_input_datetime(hass):
|
||||
hass, after="input_datetime.pm", before="input_datetime.am"
|
||||
)
|
||||
|
||||
assert not condition.time(hass, after="input_datetime.not_existing")
|
||||
assert not condition.time(hass, before="input_datetime.not_existing")
|
||||
with pytest.raises(ConditionError):
|
||||
condition.time(hass, after="input_datetime.not_existing")
|
||||
|
||||
with pytest.raises(ConditionError):
|
||||
condition.time(hass, before="input_datetime.not_existing")
|
||||
|
||||
|
||||
async def test_if_numeric_state_raises_on_unavailable(hass, caplog):
|
||||
|
||||
Reference in New Issue
Block a user