Upgrade uber_rides to 0.2.7 (#3876)

This commit is contained in:
Fabian Affolter 2016-10-15 06:00:27 +02:00 committed by Paulus Schoutsen
parent bead274b20
commit 180e146e14
2 changed files with 6 additions and 7 deletions

View File

@ -14,7 +14,7 @@ from homeassistant.helpers.entity import Entity
from homeassistant.util import Throttle from homeassistant.util import Throttle
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
REQUIREMENTS = ['uber_rides==0.2.5'] REQUIREMENTS = ['uber_rides==0.2.7']
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@ -49,10 +49,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
wanted_product_ids = config.get(CONF_PRODUCT_IDS) wanted_product_ids = config.get(CONF_PRODUCT_IDS)
dev = [] dev = []
timeandpriceest = UberEstimate(session, config[CONF_START_LATITUDE], timeandpriceest = UberEstimate(
config[CONF_START_LONGITUDE], session, config[CONF_START_LATITUDE], config[CONF_START_LONGITUDE],
config.get(CONF_END_LATITUDE), config.get(CONF_END_LATITUDE), config.get(CONF_END_LONGITUDE))
config.get(CONF_END_LONGITUDE))
for product_id, product in timeandpriceest.products.items(): for product_id, product in timeandpriceest.products.items():
if (wanted_product_ids is not None) and \ if (wanted_product_ids is not None) and \
(product_id not in wanted_product_ids): (product_id not in wanted_product_ids):
@ -114,7 +113,7 @@ class UberSensor(Entity):
@property @property
def device_state_attributes(self): def device_state_attributes(self):
"""Return the state attributes.""" """Return the state attributes."""
time_estimate = self._product.get("time_estimate_seconds") time_estimate = self._product.get('time_estimate_seconds')
params = { params = {
'Product ID': self._product['product_id'], 'Product ID': self._product['product_id'],
'Product short description': self._product['short_description'], 'Product short description': self._product['short_description'],

View File

@ -491,7 +491,7 @@ transmissionrpc==0.11
twilio==5.4.0 twilio==5.4.0
# homeassistant.components.sensor.uber # homeassistant.components.sensor.uber
uber_rides==0.2.5 uber_rides==0.2.7
# homeassistant.components.device_tracker.unifi # homeassistant.components.device_tracker.unifi
unifi==1.2.5 unifi==1.2.5