def sync(self): """Sync the Harmony device with the web service.""" import pyharmony _LOGGER.debug('syncing hub with Harmony servers') pyharmony.ha_sync(self._token, self._ip, self._port) self._config = pyharmony.ha_get_config(self._token, self._ip, self._port) _LOGGER.debug('writing hub config to file: ' + self._config_path)
def sync(self): """Sync the Harmony device with the web service.""" import pyharmony _LOGGER.debug("Syncing hub with Harmony servers") pyharmony.ha_sync(self._token, self._ip, self._port) self._config = pyharmony.ha_get_config( self._token, self._ip, self._port) _LOGGER.debug("Writing hub config to file: %s", self._config_path) pyharmony.ha_write_config_file(self._config, self._config_path)
def sync(self): """Sync the Harmony device with the web service.""" import pyharmony _LOGGER.debug("Syncing hub with Harmony servers") pyharmony.ha_sync(self._token, self.host, self._port) self._config = pyharmony.ha_get_config(self._token, self.host, self._port) _LOGGER.debug("Writing hub config to file: %s", self._config_path) pyharmony.ha_write_config_file(self._config, self._config_path)
def __init__(self, name, host, port, activity, out_path, token): """Initialize HarmonyRemote class.""" import pyharmony from pathlib import Path _LOGGER.debug('HarmonyRemote device init started for: ' + name) self._name = name self._ip = host self._port = port self._state = None self._current_activity = None self._default_activity = activity self._token = token self._config_path = out_path _LOGGER.debug('retrieving harmony config using token: ' + token) self._config = pyharmony.ha_get_config(self._token, host, port) if not Path(self._config_path).is_file(): _LOGGER.debug('writing harmony configuration to file: ' + out_path) pyharmony.ha_write_config_file(self._config, self._config_path)
def __init__(self, name, host, port, activity, out_path, token): """Initialize HarmonyRemote class.""" import pyharmony from pathlib import Path _LOGGER.debug("HarmonyRemote device init started for: %s", name) self._name = name self._ip = host self._port = port self._state = None self._current_activity = None self._default_activity = activity self._token = token self._config_path = out_path _LOGGER.debug("Retrieving harmony config using token: %s", token) self._config = pyharmony.ha_get_config(self._token, host, port) if not Path(self._config_path).is_file(): _LOGGER.debug("Writing harmony configuration to file: %s", out_path) pyharmony.ha_write_config_file(self._config, self._config_path)