Skip to content

Commit

Permalink
Added back display names as they are used in Home Assistant
Browse files Browse the repository at this point in the history
  • Loading branch information
costastf committed Nov 30, 2019
1 parent a268fa9 commit a6844a8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions toonapilib/toonapilib.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,16 @@ def _get_agreements(self, session):
raise AgreementsRetrievalError(response.text)
return agreements

@property
def display_names(self):
"""The ids of all the agreements.
Returns:
list: A list of the agreement ids.
"""
return [agreement.display_common_name.lower() for agreement in self.agreements]

def _reset(self):
self.agreements = None
self.agreement = None
Expand Down

0 comments on commit a6844a8

Please sign in to comment.