Convert template lock to use async_track_template_result (#38946)
This commit is contained in:
1 parent
1381b279f0
commit
d7f54ce98f
4 files changed
+68
-120
No files matched your search
@@ -231,8 +231,8 @@ class TestTemplateLock:
|
||||
|
||||
assert self.hass.states.all() == []
|
||||
|
||||
def test_no_template_match_all(self, caplog):
|
||||
"""Test that we do not allow locks that match on all."""
|
||||
def test_template_static(self, caplog):
|
||||
"""Test that we allow static templates."""
|
||||
with assert_setup_component(1, "lock"):
|
||||
assert setup.setup_component(
|
||||
self.hass,
|
||||
@@ -260,12 +260,6 @@ class TestTemplateLock:
|
||||
state = self.hass.states.get("lock.template_lock")
|
||||
assert state.state == lock.STATE_UNLOCKED
|
||||
|
||||
assert (
|
||||
"Template lock 'Template Lock' has no entity ids configured to track "
|
||||
"nor were we able to extract the entities to track from the value "
|
||||
"template(s). This entity will only be able to be updated manually"
|
||||
) in caplog.text
|
||||
|
||||
self.hass.states.set("lock.template_lock", lock.STATE_LOCKED)
|
||||
self.hass.block_till_done()
|
||||
state = self.hass.states.get("lock.template_lock")
|
||||
|
||||
Reference in new issue
Block a user