From bb858fdddce530416a8275050f16450c69faa50b Mon Sep 17 00:00:00 2001 From: andythigpen Date: Sat, 7 Mar 2015 15:16:13 -0600 Subject: [PATCH] Fix issue with automation event data after YAML conversion. No need to convert to dict using json.loads when PyYAML will do that automatically. --- homeassistant/components/automation/event.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/homeassistant/components/automation/event.py b/homeassistant/components/automation/event.py index 94e1bcc805f..8a78f20d485 100644 --- a/homeassistant/components/automation/event.py +++ b/homeassistant/components/automation/event.py @@ -5,8 +5,6 @@ homeassistant.components.automation.event Offers event listening automation rules. """ import logging -import json -from homeassistant.util import convert CONF_EVENT_TYPE = "event_type" CONF_EVENT_DATA = "event_data" @@ -22,7 +20,7 @@ def register(hass, config, action): _LOGGER.error("Missing configuration key %s", CONF_EVENT_TYPE) return False - event_data = convert(config.get(CONF_EVENT_DATA), json.loads, {}) + event_data = config.get(CONF_EVENT_DATA, {}) def handle_event(event): """ Listens for events and calls the action when data matches. """