59524c7933c84680c5fb1b164814cd9b363d5727,homeassistant/components/mysensors.py,,setup,#Any#Any#,44
Before Change
CONF_PERSISTENCE_FILE, hass.config.path("mysensors.pickle"))
global GATEWAY
GATEWAY = mysensors.SerialGateway(port, node_update,
persistence=persistence,
persistence_file=persistence_file,
protocol_version=version)
GATEWAY.metric = IS_METRIC
GATEWAY.debug = config[DOMAIN].get(CONF_DEBUG, False)
GATEWAY.start()
if persistence:
for nid in GATEWAY.sensors:
node_update("node_update", nid)
After Change
GATEWAYS = {}
for index, port_item in enumerate(port):
persistence = config[DOMAIN].get(CONF_PERSISTENCE, True)
try:
persistence_f_item = persistence_file[index]
except IndexError:
_LOGGER.exception(
"No persistence_file is set for port %s,"
" disabling persistence", port_item)
persistence = False
persistence_f_item = None
GATEWAYS[port_item] = setup_gateway(
port_item, persistence, persistence_f_item)
return True
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: home-assistant/home-assistant
Commit Name: 59524c7933c84680c5fb1b164814cd9b363d5727
Time: 2015-12-05
Author: marhje52@kth.se
File Name: homeassistant/components/mysensors.py
Class Name:
Method Name: setup
Project Name: hyperdashio/hyperdash-sdk-py
Commit Name: f11bb1ef1321e9525fd92de72b2e8a78af24cf17
Time: 2017-07-16
Author: richardartoul@gmail.com
File Name: hyperdash/hyper_dash.py
Class Name: HyperDash
Method Name: run_http
Project Name: akkana/scripts
Commit Name: e1e3f45530006843db21dc084f2dde2725056168
Time: 2018-06-24
Author: akkana@shallowsky.com
File Name: quickbrowse.py
Class Name:
Method Name: