e4c5108c9deb8ecdf296f7c8da5f9dc26789d930,homeassistant/components/automation/__init__.py,,setup,#Any#Any#,37
Before Change
config_key = "{} {}".format(DOMAIN, found)
name = p_config.get(CONF_ALIAS, config_key)
action = _get_action(hass, p_config.get(CONF_ACTION, {}), name)
if action is None:
continue
if CONF_CONDITION in p_config or CONF_CONDITION_TYPE in p_config:
action = _process_if(hass, config, p_config, action)
if action is None:
continue
After Change
_setup_automation(hass, config_block, name, config)
// check for multiple block syntax
elif isinstance(config[config_key], list):
list_no = 0
for config_block in config[config_key]:
name = config_block.get(CONF_ALIAS, "{}, {}".format(config_key, list_no))
list_no += 1
config_block = _migrate_old_config(config_block)
_setup_automation(hass, config_block, name, config)
// any scalar value is incorrect
else:
_LOGGER.error("Error in config in section %s.", config_key)
found += 1
config_key = "{} {}".format(DOMAIN, found)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: home-assistant/home-assistant
Commit Name: e4c5108c9deb8ecdf296f7c8da5f9dc26789d930
Time: 2015-09-18
Author: stefan.jonasson@sitedirect.se
File Name: homeassistant/components/automation/__init__.py
Class Name:
Method Name: setup
Project Name: home-assistant/home-assistant
Commit Name: 2a210607d392cac85bb82dd576877ddb192c85c5
Time: 2018-08-16
Author: prokhorov.max@outlook.com
File Name: homeassistant/components/wemo.py
Class Name:
Method Name: setup
Project Name: floydhub/dockerfiles
Commit Name: 40a882d47b80ca9c8743510320288477445a14a2
Time: 2017-05-14
Author: dave2008713@gmail.com
File Name: floydker/src/floydker/render.py
Class Name:
Method Name: render_matrix