def refresh_data(self):
j = self.data_request({'<STR_LIT:id>': '<STR_LIT>'}).json()<EOL>self.temperature_units = j.get('<STR_LIT>', '<STR_LIT:C>')<EOL>self.model = j.get('<STR_LIT>')<EOL>self.version = j.get('<STR_LIT:version>')<EOL>self.serial_number = j.get('<STR_LIT>')<EOL>categories = {}<EOL>cats = j.get('<STR_LIT>')<EOL>for cat in cats:<EOL><INDENT>categories[cat.get('<STR_LIT:id>')] = cat.get('<STR_LIT:name>')<EOL><DEDENT>device_id_map = {}<EOL>devs = j.get('<STR_LIT>')<EOL>for dev in devs:<EOL><INDENT>dev['<STR_LIT>'] = categories.get(dev.get('<STR_LIT>'))<EOL>device_id_map[dev.get('<STR_LIT:id>')] = dev<EOL><DEDENT>return device_id_map<EOL>
Refresh data from Vera device.