Convert template fan to use async_track_template_result (#38983)

* 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
This commit is contained in:
J. Nick Koston 2020-08-20 08:53:45 -05:00 committed by GitHub
parent 264e340b9e
commit f3d077c1e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 91 additions and 140 deletions

View file

@ -414,8 +414,9 @@ async def test_invalid_availability_template_keeps_component_available(hass, cap
await hass.async_block_till_done()
assert hass.states.get("fan.test_fan").state != STATE_UNAVAILABLE
assert ("Could not render availability_template template") in caplog.text
assert ("UndefinedError: 'x' is undefined") in caplog.text
assert "TemplateError" in caplog.text
assert "x" in caplog.text
# End of template tests #