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:
1 parent
074fcd96ed
commit
1bd31e3459
64 files changed
+147
-168
No files matched your search
@@ -9,8 +9,7 @@ import logging
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import (CONF_HOST, CONF_PORT, CONF_DEVICE,
|
||||
CONF_NAME, EVENT_HOMEASSISTANT_STOP,
|
||||
STATE_UNKNOWN)
|
||||
CONF_NAME, EVENT_HOMEASSISTANT_STOP)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
@@ -105,7 +104,7 @@ class KWBSensor(Entity):
|
||||
"""Return the state of value."""
|
||||
if self._sensor.value is not None and self._sensor.available:
|
||||
return self._sensor.value
|
||||
return STATE_UNKNOWN
|
||||
return None
|
||||
|
||||
@property
|
||||
def unit_of_measurement(self):
|
||||
|
||||
Reference in new issue
Block a user