mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix issue with automation event data after YAML conversion.
No need to convert to dict using json.loads when PyYAML will do that automatically.
This commit is contained in:
parent
c3c07d621a
commit
bb858fdddc
@ -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. """
|
||||
|
Loading…
x
Reference in New Issue
Block a user