Skip to content

Commit

Permalink
Use tuples instead of lists internally
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Jan 11, 2015
1 parent 283b187 commit ca49a2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions homeassistant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def _process_match_param(parameter):
elif isinstance(parameter, list):
return parameter
else:
return [parameter]
return (parameter,)


def _matcher(subject, pattern):
Expand Down Expand Up @@ -589,7 +589,7 @@ def track_change(self, entity_ids, action, from_state=None, to_state=None):

# Ensure it is a lowercase list with entity ids we want to match on
if isinstance(entity_ids, str):
entity_ids = [entity_ids.lower()]
entity_ids = (entity_ids.lower(),)
else:
entity_ids = [entity_id.lower() for entity_id in entity_ids]

Expand Down

0 comments on commit ca49a2a

Please sign in to comment.