def get_config(self): 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): 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 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 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) -> None: """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_object=body, ) if Helpers.code_check(r): self.config = Helpers.build_config_dict(r) logger.debug('Error getting %s config info', self.device_name)
def get_config(self) -> None: """Get 15A outlet configuration info.""" body = Helpers.req_body(self.manager, 'devicedetail') body['method'] = 'configurations' body['uuid'] = self.uuid r, _ = Helpers.call_api( '/15a/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('Unable to get %s config info', self.device_name)
def get_config(self) -> None: """Get dimmable switch device configuration info.""" body = helpers.req_body(self.manager, 'devicedetail') body['method'] = 'configurations' body['uuid'] = self.uuid r, _ = helpers.call_api( '/dimmer/v1/device/configurations', 'post', headers=helpers.req_headers(self.manager), json_object=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) -> None: """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_object=body, ) if r is not None and Helpers.code_check(r): self.config = Helpers.build_config_dict(r) else: logger.debug('Unable to get config info for %s', self.device_name)