mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Don't thow exception if connection to server is lost (#5775)
This commit is contained in:
parent
e5256ccf1f
commit
f3b9fa2f41
@ -85,7 +85,9 @@ class TelldusLiveSensor(TelldusLiveEntity):
|
|||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
"""Return the state of the sensor."""
|
"""Return the state of the sensor."""
|
||||||
if self._type == SENSOR_TYPE_TEMP:
|
if not self.available:
|
||||||
|
return None
|
||||||
|
elif self._type == SENSOR_TYPE_TEMP:
|
||||||
return self._value_as_temperature
|
return self._value_as_temperature
|
||||||
elif self._type == SENSOR_TYPE_HUMIDITY:
|
elif self._type == SENSOR_TYPE_HUMIDITY:
|
||||||
return self._value_as_humidity
|
return self._value_as_humidity
|
||||||
|
@ -17,7 +17,7 @@ import voluptuous as vol
|
|||||||
|
|
||||||
DOMAIN = 'tellduslive'
|
DOMAIN = 'tellduslive'
|
||||||
|
|
||||||
REQUIREMENTS = ['tellduslive==0.3.0']
|
REQUIREMENTS = ['tellduslive==0.3.2']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -645,7 +645,7 @@ steamodd==4.21
|
|||||||
tellcore-py==1.1.2
|
tellcore-py==1.1.2
|
||||||
|
|
||||||
# homeassistant.components.tellduslive
|
# homeassistant.components.tellduslive
|
||||||
tellduslive==0.3.0
|
tellduslive==0.3.2
|
||||||
|
|
||||||
# homeassistant.components.sensor.temper
|
# homeassistant.components.sensor.temper
|
||||||
temperusb==1.5.1
|
temperusb==1.5.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user