mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Use None instead of STATE_UNKNOWN in template lock (#53286)
This commit is contained in:
parent
34b1ab5f5c
commit
84c482441d
@ -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."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user