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.util import Throttle
|
||||
|
||||
REQUIREMENTS = ['uber_rides==0.5.1']
|
||||
REQUIREMENTS = ['uber_rides==0.5.2']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@ -87,11 +87,14 @@ class UberSensor(Entity):
|
||||
if self._product.get('price_details') is not None:
|
||||
price_details = self._product['price_details']
|
||||
self._unit_of_measurement = price_details.get('currency_code')
|
||||
try:
|
||||
if price_details.get('low_estimate') is not None:
|
||||
statekey = 'minimum'
|
||||
else:
|
||||
statekey = 'low_estimate'
|
||||
self._state = int(price_details.get(statekey, 0))
|
||||
self._state = int(price_details.get(statekey))
|
||||
except TypeError:
|
||||
self._state = 0
|
||||
else:
|
||||
self._state = 0
|
||||
|
||||
|
@ -954,7 +954,7 @@ transmissionrpc==0.11
|
||||
twilio==5.7.0
|
||||
|
||||
# homeassistant.components.sensor.uber
|
||||
uber_rides==0.5.1
|
||||
uber_rides==0.5.2
|
||||
|
||||
# homeassistant.components.sensor.ups
|
||||
upsmychoice==1.0.6
|
||||
|
Loading…
x
Reference in New Issue
Block a user