95370ac84baa7fb1a0494649c1d51daeaa4690ae,homeassistant/components/nanoleaf/light.py,,setup_platform,#Any#Any#Any#Any#,56
Before Change
_LOGGER.info("Discovered a new Nanoleaf: %s", discovery_info)
conf = load_json(hass.config.path(CONFIG_FILE))
if conf.get(host, {}).get("token"):
token = conf[host]["token"]
else:
host = config[CONF_HOST]
name = config[CONF_NAME]
After Change
return
_LOGGER.info("Discovered a new Nanoleaf: %s", discovery_info)
conf = load_json(hass.config.path(CONFIG_FILE))
if host in conf and device_id not in conf:
conf[device_id] = conf.pop(host)
save_json(hass.config.path(CONFIG_FILE), conf)
token = conf.get(device_id, {}).get("token", "")
else:
host = config[CONF_HOST]
name = config[CONF_NAME]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: home-assistant/home-assistant
Commit Name: 95370ac84baa7fb1a0494649c1d51daeaa4690ae
Time: 2021-03-23
Author: keijser@gmail.com
File Name: homeassistant/components/nanoleaf/light.py
Class Name:
Method Name: setup_platform
Project Name: home-assistant/home-assistant
Commit Name: 84b12ab0078ed95a4bc3de67e088027ebd919d1f
Time: 2016-11-27
Author: josh@technicalpickles.com
File Name: homeassistant/components/nest.py
Class Name:
Method Name: setup
Project Name: home-assistant/home-assistant
Commit Name: 97f62cfb789733693c537d2ad68bbf96260a1c86
Time: 2017-06-08
Author: that@teagantotally.rocks
File Name: homeassistant/components/image_processing/opencv.py
Class Name:
Method Name: setup_platform