Skip to content
Snippets Groups Projects
Commit 76a0763c authored by Fabian Affolter's avatar Fabian Affolter Committed by Daniel Høyer Iversen
Browse files

Remove STATE_UNKNOWN (#10064)

parent f4f36a36
No related branches found
No related tags found
No related merge requests found
...@@ -13,8 +13,7 @@ import voluptuous as vol ...@@ -13,8 +13,7 @@ import voluptuous as vol
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import ( from homeassistant.const import (
CONF_HOST, CONF_PORT, STATE_UNKNOWN, CONF_NAME, CONF_RESOURCES, CONF_HOST, CONF_PORT, CONF_NAME, CONF_RESOURCES, TEMP_CELSIUS)
TEMP_CELSIUS)
from homeassistant.helpers.entity import Entity from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle from homeassistant.util import Throttle
...@@ -81,7 +80,7 @@ class GlancesSensor(Entity): ...@@ -81,7 +80,7 @@ class GlancesSensor(Entity):
self.rest = rest self.rest = rest
self._name = name self._name = name
self.type = sensor_type self.type = sensor_type
self._state = STATE_UNKNOWN self._state = None
self._unit_of_measurement = SENSOR_TYPES[sensor_type][1] self._unit_of_measurement = SENSOR_TYPES[sensor_type][1]
@property @property
...@@ -164,7 +163,7 @@ class GlancesData(object): ...@@ -164,7 +163,7 @@ class GlancesData(object):
def __init__(self, resource): def __init__(self, resource):
"""Initialize the data object.""" """Initialize the data object."""
self._resource = resource self._resource = resource
self.data = dict() self.data = {}
@Throttle(MIN_TIME_BETWEEN_UPDATES) @Throttle(MIN_TIME_BETWEEN_UPDATES)
def update(self): def update(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment