Skip to content

Commit

Permalink
Radarr sensor fix for issue home-assistant#8250
Browse files Browse the repository at this point in the history
  • Loading branch information
hoopty committed Jul 12, 2017
1 parent 70c51c2 commit cd3cc71
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions homeassistant/components/sensor/radarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,9 @@ def get_date(zone, offset=0):

def get_release_date(data):
"""Get release date."""
if 'physicalRelease' in data:
date = data['physicalRelease']
else:
date = data['inCinemas']
date = data.get('physicalRelease')
if not date:
date = data.get('inCinemas')
return date


Expand Down

0 comments on commit cd3cc71

Please sign in to comment.