From a7889ef628e7b435346c81403ea026cffbc6d11d Mon Sep 17 00:00:00 2001
From: theolind <theodor.lindquist@gmail.com>
Date: Mon, 24 Aug 2015 21:19:47 +0200
Subject: [PATCH] Automation component now supports YAML lists for config key
 service_entity_id

---
 homeassistant/components/automation/__init__.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/homeassistant/components/automation/__init__.py b/homeassistant/components/automation/__init__.py
index 54d16bcca37..8dcb158dea4 100644
--- a/homeassistant/components/automation/__init__.py
+++ b/homeassistant/components/automation/__init__.py
@@ -62,8 +62,12 @@ def _get_action(hass, config):
                 service_data = {}
 
             if CONF_SERVICE_ENTITY_ID in config:
-                service_data[ATTR_ENTITY_ID] = \
-                    config[CONF_SERVICE_ENTITY_ID].split(",")
+                try:
+                    service_data[ATTR_ENTITY_ID] = \
+                        config[CONF_SERVICE_ENTITY_ID].split(",")
+                except AttributeError:
+                    service_data[ATTR_ENTITY_ID] = \
+                        config[CONF_SERVICE_ENTITY_ID]
 
             hass.services.call(domain, service, service_data)