mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Use tuples instead of lists internally
This commit is contained in:
parent
283b187501
commit
ca49a2aa68
@ -223,7 +223,7 @@ def _process_match_param(parameter):
|
|||||||
elif isinstance(parameter, list):
|
elif isinstance(parameter, list):
|
||||||
return parameter
|
return parameter
|
||||||
else:
|
else:
|
||||||
return [parameter]
|
return (parameter,)
|
||||||
|
|
||||||
|
|
||||||
def _matcher(subject, pattern):
|
def _matcher(subject, pattern):
|
||||||
@ -589,7 +589,7 @@ class StateMachine(object):
|
|||||||
|
|
||||||
# Ensure it is a lowercase list with entity ids we want to match on
|
# Ensure it is a lowercase list with entity ids we want to match on
|
||||||
if isinstance(entity_ids, str):
|
if isinstance(entity_ids, str):
|
||||||
entity_ids = [entity_ids.lower()]
|
entity_ids = (entity_ids.lower(),)
|
||||||
else:
|
else:
|
||||||
entity_ids = [entity_id.lower() for entity_id in entity_ids]
|
entity_ids = [entity_id.lower() for entity_id in entity_ids]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user