def data_import(self, json_response):
if '<STR_LIT:data>' not in json_response:<EOL><INDENT>raise PyVLXException('<STR_LIT>'.format(<EOL>json.dumps(json_response)))<EOL><DEDENT>data = json_response['<STR_LIT:data>']<EOL>for item in data:<EOL><INDENT>if '<STR_LIT>' not in item:<EOL><INDENT>raise PyVLXException('<STR_LIT>'.format(<EOL>json.dumps(item)))<EOL><DEDENT>category = item['<STR_LIT>']<EOL>if category == '<STR_LIT>':<EOL><INDENT>self.load_window_opener(item)<EOL><DEDENT>elif category in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>self.load_roller_shutter(item)<EOL><DEDENT>elif category in ['<STR_LIT>']:<EOL><INDENT>self.load_blind(item)<EOL><DEDENT>else:<EOL><INDENT>self.pyvlx.logger.warning(<EOL>'<STR_LIT>', category)<EOL><DEDENT><DEDENT>
Import data from json response.