Ejemplo n.º 1
0
 def save_credentials(event):
     """Save currently set OAuth credentials."""
     if hass.data[DOMAIN]["oauth"].get("email") is None:
         config_path = hass.config.path(WINK_CONFIG_FILE)
         _config = pywink.get_current_oauth_credentials()
         save_json(config_path, _config)
Ejemplo n.º 2
0
 def save_credentials(event):
     """Save currently set OAuth credentials."""
     if hass.data[DOMAIN]["oauth"].get("email") is None:
         config_path = hass.config.path(WINK_CONFIG_FILE)
         _config = pywink.get_current_oauth_credentials()
         save_json(config_path, _config)