def get_config(self): """Get 7A outlet configuration info.""" r, _ = helpers.call_api( '/v1/device/' + self.cid + '/configurations', 'get', headers=helpers.req_headers(self.manager) ) if 'currentFirmVersion' in r: self.config = helpers.build_config_dict(r)
def get_config(self): """Get 7A outlet configuration info.""" r, _ = helpers.call_api('/v1/device/' + self.cid + '/configurations', 'get', headers=helpers.req_headers(self.manager)) if 'currentFirmVersion' in r: self.config = helpers.build_config_dict(r) else: _LOGGER.debug("Error getting configuration info for %s", self.device_name)
def get_config(self): """Get configuration and firmware info of tunable bulb.""" body = helpers.req_body(self.manager, 'bypass_config') body['uuid'] = self.uuid r, _ = helpers.call_api('/cloud/v1/deviceManaged/configurations', 'post', headers=helpers.req_headers(self.manager), json=body) if helpers.check_response(r, 'config'): self.config = helpers.build_config_dict(r)
def get_config(self): """Get configuration of dimmable bulb.""" body = helpers.req_body(self.manager, 'devicedetail') body['method'] = 'configurations' body['uuid'] = self.uuid r, _ = helpers.call_api('/SmartBulb/v1/device/configurations', 'post', headers=helpers.req_headers(self.manager), json=body) if helpers.check_response(r, 'config'): self.config = helpers.build_config_dict(r)
def get_config(self): """Get configuration and firmware info of tunable bulb.""" body = helpers.req_body(self.manager, 'bypass_config') body['uuid'] = self.uuid r, _ = helpers.call_api('/cloud/v1/deviceManaged/configurations', 'post', headers=helpers.req_headers(self.manager), json=body) if helpers.code_check(r): self.config = helpers.build_config_dict(r) else: logger.debug("Error getting %s config info", self.device_name)
def get_config(self): """Get switch device configuration info.""" body = helpers.req_body(self.manager, 'devicedetail') body['method'] = 'configurations' body['uuid'] = self.uuid r, _ = helpers.call_api( '/inwallswitch/v1/device/configurations', 'post', headers=helpers.req_headers(self.manager), json=body) if helpers.check_response(r, 'config'): self.config = helpers.build_config_dict(r)
def get_config(self): """Get switch device configuration info.""" body = helpers.req_body(self.manager, 'devicedetail') body['method'] = 'configurations' body['uuid'] = self.uuid r, _ = helpers.call_api('/inwallswitch/v1/device/configurations', 'post', headers=helpers.req_headers(self.manager), json=body) if helpers.code_check(r): self.config = helpers.build_config_dict(r) else: logger.warning("Unable to get %s config info", self.device_name)
def get_config(self): """Get configuration info for outdoor outlet.""" body = helpers.req_body(self.manager, 'devicedetail') body['method'] = 'configurations' body['uuid'] = self.uuid r, _ = helpers.call_api('/outdoorsocket15a/v1/device/configurations', 'post', headers=helpers.req_headers(self.manager), json=body) if helpers.code_check(r): self.config = helpers.build_config_dict(r) else: _LOGGER.debug("Error getting %s config info", self.device_name)
def get_config(self): """Get configuration of dimmable bulb.""" body = helpers.req_body(self.manager, 'devicedetail') body['method'] = 'configurations' body['uuid'] = self.uuid r, _ = helpers.call_api('/SmartBulb/v1/device/configurations', 'post', headers=helpers.req_headers(self.manager), json=body) if helpers.code_check(r): self.config = helpers.build_config_dict(r) else: logger.warning("Error getting %s config info", self.device_name)
def get_config(self): """Get configuration info for air purifier.""" body = helpers.req_body(self.manager, 'devicedetail') body['method'] = 'configurations' body['uuid'] = self.uuid r, _ = helpers.call_api('/131airpurifier/v1/device/configurations', 'post', headers=helpers.req_headers(self.manager), json=body) if helpers.code_check(r): self.config = helpers.build_config_dict(r) else: _LOGGER.warning("Unable to get config info for %s", self.device_name)