2a210607d392cac85bb82dd576877ddb192c85c5,homeassistant/components/wemo.py,,setup,#Any#Any#,48
Before Change
discovery.listen(hass, SERVICE_WEMO, discovery_dispatch)
_LOGGER.info("Scanning for WeMo devices.")
devices = [(device.host, device) for device in pywemo.discover_devices()]
// Add static devices from the config file.
devices.extend((address, None)
for address in config.get(DOMAIN, {}).get(CONF_STATIC, []))
After Change
devices = []
for host, port in config.get(DOMAIN, {}).get(CONF_STATIC, []):
url = setup_url_for_address(host, port)
if not url:
_LOGGER.error(
"Unable to get description url for %s",
"{}:{}".format(host, port) if port else host)
return False
try:
device = pywemo.discovery.device_from_description(url, None)
except (requests.exceptions.ConnectionError,
requests.exceptions.Timeout) as err:
_LOGGER.error("Unable to access %s (%s)", url, err)
return False
devices.append((url, device))
_LOGGER.info("Scanning for WeMo devices.")
devices.extend(
(setup_url_for_device(device), device)
for device in pywemo.discover_devices())
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances 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: sahana/eden
Commit Name: d0836dd9d191d5a0f0b944e8a71cedaeb2c05724
Time: 2020-07-15
Author: fran@aidiq.com
File Name: modules/s3/s3task.py
Class Name: S3Task
Method Name: run_async
Project Name: home-assistant/home-assistant
Commit Name: 64a5bff5b299d25e5e0e25aebd0530efd9a4408d
Time: 2016-12-03
Author: josh@technicalpickles.com
File Name: homeassistant/components/sensor/nest.py
Class Name:
Method Name: setup_platform