Fixed lint issue from merge

extract_entity_ids from the service helpers was overwriting the service
decorator with one of its attributes. This was fixed.
This commit is contained in:
Ryan Kraus 2016-01-24 23:00:43 -05:00
parent 60dd2d441d
commit 3b89102338

View File

@ -64,18 +64,18 @@ def call_from_config(hass, config, blocking=False):
hass.services.call(domain, service_name, service_data, blocking) hass.services.call(domain, service_name, service_data, blocking)
def extract_entity_ids(hass, service): def extract_entity_ids(hass, service_call):
""" """
Helper method to extract a list of entity ids from a service call. Helper method to extract a list of entity ids from a service call.
Will convert group entity ids to the entity ids it represents. Will convert group entity ids to the entity ids it represents.
""" """
if not (service.data and ATTR_ENTITY_ID in service.data): if not (service_call.data and ATTR_ENTITY_ID in service_call.data):
return [] return []
group = get_component('group') group = get_component('group')
# Entity ID attr can be a list or a string # Entity ID attr can be a list or a string
service_ent_id = service.data[ATTR_ENTITY_ID] service_ent_id = service_call.data[ATTR_ENTITY_ID]
if isinstance(service_ent_id, str): if isinstance(service_ent_id, str):
return group.expand_entity_ids(hass, [service_ent_id]) return group.expand_entity_ids(hass, [service_ent_id])