Skip to content

Commit

Permalink
lyft sensor: re-enable Prime Time rate attribute (#6982)
Browse files Browse the repository at this point in the history
Turns out this does work correctly even without a user login
(assuming that sandbox mode is disabled)
  • Loading branch information
drkp authored and fabaff committed Apr 22, 2017
1 parent 5bfe5b3 commit 2c39038
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions homeassistant/components/sensor/lyft.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,8 @@ def device_state_attributes(self):
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']
Expand Down

0 comments on commit 2c39038

Please sign in to comment.