Use STATE_UNKNOWN constant in dlink and ecobee (#39948)
This commit is contained in:
1 parent
50c573eb4d
commit
719aa0f317
2 files changed
+9
-3
No files matched your search
@@ -5,6 +5,7 @@ from homeassistant.const import (
|
||||
DEVICE_CLASS_HUMIDITY,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
PERCENTAGE,
|
||||
STATE_UNKNOWN,
|
||||
TEMP_FAHRENHEIT,
|
||||
)
|
||||
from homeassistant.helpers.entity import Entity
|
||||
@@ -108,7 +109,11 @@ class EcobeeSensor(Entity):
|
||||
@property
|
||||
def state(self):
|
||||
"""Return the state of the sensor."""
|
||||
if self._state in [ECOBEE_STATE_CALIBRATING, ECOBEE_STATE_UNKNOWN, "unknown"]:
|
||||
if self._state in [
|
||||
ECOBEE_STATE_CALIBRATING,
|
||||
ECOBEE_STATE_UNKNOWN,
|
||||
STATE_UNKNOWN,
|
||||
]:
|
||||
return None
|
||||
|
||||
if self.type == "temperature":
|
||||
|
||||
Reference in new issue
Block a user