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 -3
View File
@@ -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):