Change STATE_UNKOWN to None (#20337)

* Change STATE_UNKOWN to None

* Change STATE_UNKOWN to None

* tests

* tests

* tests

* tests

* tests

* style

* fix comments

* fix comments

* update fan test
This commit is contained in:
Daniel Høyer Iversen authored and Martin Hjelmare committed 2019-01-24 08:20:20 +01:00
1 parent 074fcd96ed
commit 1bd31e3459
64 files changed
+147 -168

No files matched your search

+2 -2
View File
@@ -17,7 +17,7 @@ from homeassistant.helpers.config_validation import PLATFORM_SCHEMA # noqa
import homeassistant.helpers.config_validation as cv
from homeassistant.const import (
ATTR_CODE, ATTR_CODE_FORMAT, ATTR_ENTITY_ID, STATE_LOCKED, STATE_UNLOCKED,
STATE_UNKNOWN, SERVICE_LOCK, SERVICE_UNLOCK, SERVICE_OPEN)
SERVICE_LOCK, SERVICE_UNLOCK, SERVICE_OPEN)
from homeassistant.components import group
ATTR_CHANGED_BY = 'changed_by'
@@ -150,5 +150,5 @@ class LockDevice(Entity):
"""Return the state."""
locked = self.is_locked
if locked is None:
return STATE_UNKNOWN
return None
return STATE_LOCKED if locked else STATE_UNLOCKED