Use None instead of STATE_UNKNOWN in template lock (#53286)

This commit is contained in:
J. Nick Koston 2021-07-21 11:29:41 -10:00 committed by GitHub
parent 34b1ab5f5c
commit 84c482441d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,6 @@ from homeassistant.const import (
CONF_VALUE_TEMPLATE, CONF_VALUE_TEMPLATE,
STATE_LOCKED, STATE_LOCKED,
STATE_ON, STATE_ON,
STATE_UNKNOWN,
STATE_UNLOCKED, STATE_UNLOCKED,
) )
from homeassistant.core import callback from homeassistant.core import callback
@ -145,7 +144,7 @@ class TemplateLock(TemplateEntity, LockEntity):
self._state = result.lower() self._state = result.lower()
return return
self._state = STATE_UNKNOWN self._state = None
async def async_added_to_hass(self): async def async_added_to_hass(self):
"""Register callbacks.""" """Register callbacks."""