ced3cd2616332af50bf9a8a4a7241aae017c34e8,homeassistant/components/sensor/neurio_energy.py,,setup_platform,#Any#Any#Any#Any#,36

Before Change


    if not sensor_id:
        import neurio
        neurio_tp = neurio.TokenProvider(key=api_key, secret=api_secret)
        neurio_client = neurio.Client(token_provider=neurio_tp)
        user_info = neurio_client.get_user_information()
        _LOGGER.warning("Sensor ID auto-detected, set api_sensor_id: "%s"",
                        user_info["locations"][0]["sensors"][0]["sensorId"])
        sensor_id = user_info["locations"][0]["sensors"][0]["sensorId"]

After Change


    update_active()

    // Active power sensor
    add_devices([NeurioEnergy(data, ACTIVE_NAME, ACTIVE_TYPE, update_active)])
    // Daily power sensor
    add_devices([NeurioEnergy(data, DAILY_NAME, DAILY_TYPE, update_daily)])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: home-assistant/home-assistant
Commit Name: ced3cd2616332af50bf9a8a4a7241aae017c34e8
Time: 2017-03-16
Author: mezz@johnmihalic.com
File Name: homeassistant/components/sensor/neurio_energy.py
Class Name:
Method Name: setup_platform


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 34577913e8d62f0db23231f4882263b6825fa271
Time: 2017-08-28
Author: jonwayne@google.com
File Name: pubsub/cloud-client/iam.py
Class Name:
Method Name: set_subscription_policy


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: a366fb0d2fb91f7297949c718c749a4587ad78a6
Time: 2018-05-18
Author: rennie@google.com
File Name: monitoring/api/v3/cloud-client/quickstart.py
Class Name:
Method Name: run_quickstart


Project Name: castorini/honk
Commit Name: 806ab21bced7315212dfc3fac37037978c5bb62f
Time: 2017-09-29
Author: tang.raphael@gmail.com
File Name: utils/client.py
Class Name:
Method Name: main


Project Name: samuelclay/NewsBlur
Commit Name: 8427be68627d6dbdaafd27deee5fd4c6fee3576c
Time: 2020-11-13
Author: samuel@ofbrooklyn.com
File Name: newsblur/settings.py
Class Name:
Method Name: