12495c717e9c901e106fd3f46c79049e73d5e7eb,homeassistant/components/script.py,,setup,#Any#Any#,61

Before Change


        alias = cfg.get(CONF_ALIAS, name)
        script = Script(hass, alias, cfg[CONF_SEQUENCE])
        component.add_entities((script,))
        _, object_id = split_entity_id(script.entity_id)
        hass.services.register(DOMAIN, object_id, service_handler)

    def turn_on_service(service):
         Calls a service to turn script on. 

After Change


            script.turn_on()

    for object_id, cfg in config[DOMAIN].items():
        if object_id != slugify(object_id):
            _LOGGER.warn("Found invalid key for script: %s. Use %s instead.",
                         object_id, slugify(object_id))
            continue
        if not cfg.get(CONF_SEQUENCE):
            _LOGGER.warn("Missing key "sequence" for script %s", object_id)
            continue
        alias = cfg.get(CONF_ALIAS, object_id)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: home-assistant/home-assistant
Commit Name: 12495c717e9c901e106fd3f46c79049e73d5e7eb
Time: 2015-10-28
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/script.py
Class Name:
Method Name: setup


Project Name: home-assistant/home-assistant
Commit Name: a91163877f35db5e456fa4b66c1f048ced947ba9
Time: 2016-01-21
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/script.py
Class Name: Script
Method Name: _call_service


Project Name: home-assistant/home-assistant
Commit Name: 8fdf2d608afa36b4c4436c652a8b123056d44348
Time: 2014-04-13
Author: Paulus@PaulusSchoutsen.nl
File Name: homeassistant/components/__init__.py
Class Name:
Method Name: turn_off