mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 06:47:09 +00:00
Upgrade uber_rides to 0.5.2 (#9149)
This commit is contained in:
parent
f47de06f02
commit
8fdd9712e6
@ -14,7 +14,7 @@ from homeassistant.components.sensor import PLATFORM_SCHEMA
|
|||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.util import Throttle
|
from homeassistant.util import Throttle
|
||||||
|
|
||||||
REQUIREMENTS = ['uber_rides==0.5.1']
|
REQUIREMENTS = ['uber_rides==0.5.2']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -87,11 +87,14 @@ class UberSensor(Entity):
|
|||||||
if self._product.get('price_details') is not None:
|
if self._product.get('price_details') is not None:
|
||||||
price_details = self._product['price_details']
|
price_details = self._product['price_details']
|
||||||
self._unit_of_measurement = price_details.get('currency_code')
|
self._unit_of_measurement = price_details.get('currency_code')
|
||||||
if price_details.get('low_estimate') is not None:
|
try:
|
||||||
statekey = 'minimum'
|
if price_details.get('low_estimate') is not None:
|
||||||
else:
|
statekey = 'minimum'
|
||||||
statekey = 'low_estimate'
|
else:
|
||||||
self._state = int(price_details.get(statekey, 0))
|
statekey = 'low_estimate'
|
||||||
|
self._state = int(price_details.get(statekey))
|
||||||
|
except TypeError:
|
||||||
|
self._state = 0
|
||||||
else:
|
else:
|
||||||
self._state = 0
|
self._state = 0
|
||||||
|
|
||||||
|
@ -954,7 +954,7 @@ transmissionrpc==0.11
|
|||||||
twilio==5.7.0
|
twilio==5.7.0
|
||||||
|
|
||||||
# homeassistant.components.sensor.uber
|
# homeassistant.components.sensor.uber
|
||||||
uber_rides==0.5.1
|
uber_rides==0.5.2
|
||||||
|
|
||||||
# homeassistant.components.sensor.ups
|
# homeassistant.components.sensor.ups
|
||||||
upsmychoice==1.0.6
|
upsmychoice==1.0.6
|
||||||
|
Loading…
x
Reference in New Issue
Block a user