def update(self):
self._controller.update(self._id, wake_if_asleep=False)<EOL>data = self._controller.get_charging_params(self._id)<EOL>if data:<EOL><INDENT>self.__battery_range = data['<STR_LIT>']<EOL>self.__est_battery_range = data['<STR_LIT>']<EOL>self.__ideal_battery_range = data['<STR_LIT>']<EOL><DEDENT>data = self._controller.get_gui_params(self._id)<EOL>if data:<EOL><INDENT>if data['<STR_LIT>'] == "<STR_LIT>":<EOL><INDENT>self.measurement = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>self.measurement = '<STR_LIT>'<EOL><DEDENT>self.__rated = (data['<STR_LIT>'] == "<STR_LIT>")<EOL><DEDENT>
Update the battery range state.