Upgrade luftdaten to 0.1.3 (#11316)

This commit is contained in:
Fabian Affolter 2017-12-27 09:19:02 +01:00 committed by Pascal Vizeli
parent af6c39f4d1
commit 40e1d35268
2 changed files with 11 additions and 11 deletions

View file

@ -18,7 +18,7 @@ import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle
REQUIREMENTS = ['luftdaten==0.1.1']
REQUIREMENTS = ['luftdaten==0.1.3']
_LOGGER = logging.getLogger(__name__)
@ -114,17 +114,17 @@ class LuftdatenSensor(Entity):
@property
def device_state_attributes(self):
"""Return the state attributes."""
if self.luftdaten.data.meta is None:
try:
attr = {
ATTR_ATTRIBUTION: CONF_ATTRIBUTION,
ATTR_SENSOR_ID: self._sensor_id,
'lat': self.luftdaten.data.meta['latitude'],
'long': self.luftdaten.data.meta['longitude'],
}
return attr
except KeyError:
return
attr = {
ATTR_ATTRIBUTION: CONF_ATTRIBUTION,
ATTR_SENSOR_ID: self._sensor_id,
'lat': self.luftdaten.data.meta['latitude'],
'long': self.luftdaten.data.meta['longitude'],
}
return attr
@asyncio.coroutine
def async_update(self):
"""Get the latest data from luftdaten.info and update the state."""

View file

@ -451,7 +451,7 @@ liveboxplaytv==2.0.2
lmnotify==0.0.4
# homeassistant.components.sensor.luftdaten
luftdaten==0.1.1
luftdaten==0.1.3
# homeassistant.components.sensor.lyft
lyft_rides==0.2