mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Upgrade luftdaten to 0.1.3 (#11316)
This commit is contained in:
parent
af6c39f4d1
commit
40e1d35268
@ -18,7 +18,7 @@ import homeassistant.helpers.config_validation as cv
|
|||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.util import Throttle
|
from homeassistant.util import Throttle
|
||||||
|
|
||||||
REQUIREMENTS = ['luftdaten==0.1.1']
|
REQUIREMENTS = ['luftdaten==0.1.3']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -114,17 +114,17 @@ class LuftdatenSensor(Entity):
|
|||||||
@property
|
@property
|
||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Return the state attributes."""
|
"""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
|
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
|
@asyncio.coroutine
|
||||||
def async_update(self):
|
def async_update(self):
|
||||||
"""Get the latest data from luftdaten.info and update the state."""
|
"""Get the latest data from luftdaten.info and update the state."""
|
||||||
|
@ -451,7 +451,7 @@ liveboxplaytv==2.0.2
|
|||||||
lmnotify==0.0.4
|
lmnotify==0.0.4
|
||||||
|
|
||||||
# homeassistant.components.sensor.luftdaten
|
# homeassistant.components.sensor.luftdaten
|
||||||
luftdaten==0.1.1
|
luftdaten==0.1.3
|
||||||
|
|
||||||
# homeassistant.components.sensor.lyft
|
# homeassistant.components.sensor.lyft
|
||||||
lyft_rides==0.2
|
lyft_rides==0.2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user