lyft sensor: re-enable Prime Time rate attribute (#6982)

Turns out this does work correctly even without a user login
(assuming that sandbox mode is disabled)
pull/7234/head^2
Dan Ports 2017-04-22 12:16:06 -07:00 committed by Fabian Affolter
parent 5bfe5b3f70
commit 2c39038507
1 changed files with 2 additions and 4 deletions

View File

@ -137,10 +137,8 @@ class LyftSensor(Entity):
params['Trip duration (in seconds)'] = estimate.get(
'estimated_duration_seconds')
# Ignore the Prime Time percentage -- the Lyft API always
# returns 0 unless a user is logged in.
# params['Prime Time percentage'] = estimate.get(
# 'primetime_percentage')
params['Prime Time percentage'] = estimate.get(
'primetime_percentage')
if self._product.get("eta") is not None:
eta = self._product['eta']