mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 01:38:02 +00:00
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:
parent
60dd2d441d
commit
3b89102338
@ -64,18 +64,18 @@ def call_from_config(hass, config, blocking=False):
|
||||
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.
|
||||
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 []
|
||||
|
||||
group = get_component('group')
|
||||
|
||||
# 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):
|
||||
return group.expand_entity_ids(hass, [service_ent_id])
|
||||
|
Loading…
x
Reference in New Issue
Block a user