mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix a config bug in Automation
This commit is contained in:
parent
633d0453be
commit
948a5c97ec
@ -101,7 +101,8 @@ automation 2:
|
||||
time_seconds: 0
|
||||
|
||||
execute_service: notify.notify
|
||||
service_data: {"message":"It's 4, time for beer!"}
|
||||
service_data:
|
||||
message: It's 4, time for beer!
|
||||
|
||||
sensor:
|
||||
platform: systemmonitor
|
||||
|
@ -5,11 +5,10 @@ homeassistant.components.automation
|
||||
Allows to setup simple automation rules via the config file.
|
||||
"""
|
||||
import logging
|
||||
import json
|
||||
|
||||
from homeassistant.loader import get_component
|
||||
from homeassistant.helpers import config_per_platform
|
||||
from homeassistant.util import convert, split_entity_id
|
||||
from homeassistant.util import split_entity_id
|
||||
from homeassistant.const import ATTR_ENTITY_ID
|
||||
|
||||
DOMAIN = "automation"
|
||||
@ -54,8 +53,7 @@ def _get_action(hass, config):
|
||||
if CONF_SERVICE in config:
|
||||
domain, service = split_entity_id(config[CONF_SERVICE])
|
||||
|
||||
service_data = convert(
|
||||
config.get(CONF_SERVICE_DATA), json.loads, {})
|
||||
service_data = config.get(CONF_SERVICE_DATA, {})
|
||||
|
||||
if not isinstance(service_data, dict):
|
||||
_LOGGER.error(
|
||||
|
Loading…
x
Reference in New Issue
Block a user